New to Telerik UI for ASP.NET MVC? Download free 30-day trial
Row template
- EXAMPLE
- VIEW SOURCE
- Edit in Theme Builder
-
Change Theme
DefaultSASSLESS
- Default
- Bootstrap
- Material
- Launch Theme Builder
- rowtemplate.cshtml
- RowTemplateController.cs
Also available for:
API REFERENCEDescription
The Telerik MVC grid allows flexible customization of its rows in terms of layout and appearance by exposing row template feature for this purpose.
In this example we present how you can specify your own custom layout for the rows in the grid using images and property bindings from its underlying data source.
To do that you need to define a template column as shown below:
columns.Template(e => { }).ClientTemplate(" "). Title("Picture");
and after that using the ClientRowTemplate and ClientAltRowTemplate settings to set the custom client-side row and alt-row templates. Note that both templates should contain table row HTML elements.