This example demonstrates how to use custom header and footer templates in Telerik Grid for ASP.NET MVC. The templates can be declared through the column's HeaderTemplate and FooterTemplate methods respectively.

To define a custom header and footer templates by using the following code

<%= Html.Telerik().Grid(Model)
        .Name("Grid")
        .Columns(columns =>
        {     
            columns.Bound(p => p.ProductID)
                   .HeaderTemplate(() =>
                      {%>
                      <input id="chkAll" type="checkbox" title="check all records"/>
                      <%});
            columns.Bound(p => p.UnitPrice)
                    .FooterTemplate(() =>
                        {%>
                        Total:<%= string.Format("{0:c}", Model.TotalPrice)%>
                        <%});
        }
        .Render();            
%>