This question is locked. New answers and comments are not allowed.
Hi, i have a question regarding having a HeaderTemplate field on the controller.
Currently i am trying to have a user preference saved grid with the leftmost column having checkboxes and with the header having a check box option to select all the rows. As shown on the example here "http://demos.telerik.com/aspnet-mvc/grid/headerfootertemplates"
However i dont know how i can implement this correctly using my style. The code is as follows:
new GridColumnSettings
{
Member = "TimesheetId",
Title="checkAllRecords",
Width="35px",
ClientTemplate="<input type='checkbox' id='checkedTimesheet' name='checkedTimesheet' value='<#= TimesheetId #>' />",
//////////////////////////// This is what i am trying to input //////////////////////////////////////
HeaderTemplate = "<input type='checkbox' title='check all records' id = 'checkAllRecords'>",
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
HtmlAttributes = {{ "style", "text-align:center;" }, {"class", "timeTooltip"}}
//FooterHtmlAttributes="sdff"
},
Any help would be appreciated on how to add HeaderTemplates to GridColumnSettings.
Thanks
Currently i am trying to have a user preference saved grid with the leftmost column having checkboxes and with the header having a check box option to select all the rows. As shown on the example here "http://demos.telerik.com/aspnet-mvc/grid/headerfootertemplates"
However i dont know how i can implement this correctly using my style. The code is as follows:
new GridColumnSettings
{
Member = "TimesheetId",
Title="checkAllRecords",
Width="35px",
ClientTemplate="<input type='checkbox' id='checkedTimesheet' name='checkedTimesheet' value='<#= TimesheetId #>' />",
//////////////////////////// This is what i am trying to input //////////////////////////////////////
HeaderTemplate = "<input type='checkbox' title='check all records' id = 'checkAllRecords'>",
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
HtmlAttributes = {{ "style", "text-align:center;" }, {"class", "timeTooltip"}}
//FooterHtmlAttributes="sdff"
},
Any help would be appreciated on how to add HeaderTemplates to GridColumnSettings.
Thanks