This example shows how to create templated columns for Telerik Grid for ASP.NET MVC. Templates allow you to customize the way the data is presented in the grid. Currently templates are supported only in server binding mode. Client-side templates will be implemented in a subsequent release. Also currently you cannot sort or filter by template column.

To set the template for a column you should use the overload of the Add method which accepts Action<T>.

<%= Html.Telerik().Grid(Model)
        .Name("Grid")
        .Columns(columns => 
        {
            //Template column. The grid displays the HTML defined by the action.
            columns.Add(c => {
            %>
                <img 
                    alt="<%= c.CustomerID %>" 
                    src="<%= Url.Content("~/Content/Images/Customers/" + c.CustomerID + ".jpg") %>" 
                  />
            <%
            });
            //Regular databound column. The grid displays the value of the CustomerID property.
            columns.Add(c => c.CustomerID);
        })
 %>