Telerik Extensions for ASP.NET MVC

Version Q2 2012, released 06/07/2012

Client Templates

No records to display.
Displaying items 0 - 0 of 0

About this example ASPXRazor

This example shows how set the client-side template of a bound column. Templates allow you to customize the way the data is presented in the grid. Client-side templates are used in ajax and web service binding.

To set the client-side template use the ClientTemplate method. You can use <#= #> to embed databound expressions in a similar way to server side templates

<%= Html.Telerik().Grid<Customer>()
        .Name("Grid")
        .Columns(columns =>
        {
            columns.Bound(c => c.CustomerID)
                .ClientTemplate("<img alt='<#= CustomerID #>' src='" 
                    + Url.Content("~/Content/Grid/Customers/") 
                    + "<#= CustomerID #>.jpg' />")
                .Title("Picture");
            //omitted for brevity
        }
%>

Interested in HTML5 and mobile-powered ASP.NET MVC apps?

Experience the next generation UI and framework for ASP.NET MVC development by downloading trial evaluation copy of Kendo UI Complete for ASP.NET MVC. Jumpstart your development with the available learning resources.

The differences between Telerik MVC Extensions and Kendo UI Complete for ASP.NET MVC, and their licensing models are explained here and here.

If you have any questions, do not hesitate to contact us at sales@telerik.com.

Other Demos: