Domanda

I was told to change the Telerik grid, in a web page, to Kendo grid.

And for that, there is a column that is showing an image, depending on if it has any errors:

columns.Template(x => x.HasError)
   .ClientTemplate("<img src=<#= HasError ? \"" 
   + Url.Content("~/Content/images/109_AllAnnotations_Error_24x24_72.png") + "\" : \"" 
   + Url.Content("~/Content/images/109_AllAnnotations_Default_24x24_72.png") + "\" #> title=\"<#= LastErrorMessage #>\"").Width(100);
})

This line did just fine in the Telerik grid, but in the Kendo Grid, it gives me a "400 Bad request".

Anyone knows a solution for this?

È stato utile?

Soluzione

Try to update the template syntax from <#= #> to just #= #. This is the only difference when it comes to client templates.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top