joeharrison714 / MVCGrid.Net

http://mvcgrid.net
MIT License
74 stars 55 forks source link

how can I add img on my MVCDataGrid #101

Closed kurokibr closed 7 years ago

kurokibr commented 7 years ago

how can I add img on my MVCDataGrid.

I am trying:

cols.Add("FotoUrl").WithHeaderText("Foto") .WithSortColumnData("FotoUrl") .WithVisibility(visible: true, allowChangeVisibility: true) .WithValueExpression(i => i.FotoUrl)

                    .WithValueTemplate("<img src='/Fotos/{Model.getFotoName()}' height ='70px' width='70px'/>", true);
kurokibr commented 7 years ago

I got it with this:

.WithValueExpression(i => i.getFotoName()) .WithValueTemplate("", false);

thanks