This question is locked. New answers and comments are not allowed.
How can I format the grid header when I am using ajax binding? I do not need to format individual cells but to format the entire row.
I have tried this example. http://demos.telerik.com/aspnet-mvc/razor/grid/headerfootertemplates?theme=outlook. But it seems to be for server binding only. I need something to work for client/ajax binding.
I have found a hack. I can use a toolbar template to create the header I want; that works. Next, I need to hide the real header (hopefully, that will not hide the toolbar too or leave an empty space between the grid and the toolbar). But that is a hack. Is there a better way?
This is a look at what I have started. I want the format of the header to match the format of the rows.
.ClientRowTemplate(crt =>
"<table>" +
"<tr>" +
"<td><#= StatusImage #></td>" +
"<td>" +
"<table>" +
"<tr>" +
"<td><#= Org #></td>" +
"<td><#= ExtId #></td>" +
"<td><#= Reference #></td>" +
"</tr>" +
"<tr>" +
"<td><#= Name #></td>" +
"</tr>" +
"</table>" +
"</td>" +
"</tr>" +
"</table>")
I have tried this example. http://demos.telerik.com/aspnet-mvc/razor/grid/headerfootertemplates?theme=outlook. But it seems to be for server binding only. I need something to work for client/ajax binding.
I have found a hack. I can use a toolbar template to create the header I want; that works. Next, I need to hide the real header (hopefully, that will not hide the toolbar too or leave an empty space between the grid and the toolbar). But that is a hack. Is there a better way?
This is a look at what I have started. I want the format of the header to match the format of the rows.
.DataBinding(binding => binding.Ajax().Select(
and .ClientRowTemplate(crt =>
"<table>" +
"<tr>" +
"<td><#= StatusImage #></td>" +
"<td>" +
"<table>" +
"<tr>" +
"<td><#= Org #></td>" +
"<td><#= ExtId #></td>" +
"<td><#= Reference #></td>" +
"</tr>" +
"<tr>" +
"<td><#= Name #></td>" +
"</tr>" +
"</table>" +
"</td>" +
"</tr>" +
"</table>")