Question

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?

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top