Server Row Template
Maria Anders
| ||||
Ana Trujillo
| ||||
Antonio Moreno
| ||||
Thomas Hardy
| ||||
Christina Berglund
| ||||
Hanna Moos
| ||||
Frédérique Citeaux
| ||||
Martín Sommer
| ||||
Laurence Lebihan
| ||||
Elizabeth Lincoln
|
About this example ASPXRazor
This example shows how set the server-side row template of the grid. The row template allows you to customize the way the entire row is presented in the grid. Server-side row templates are used in server binding scenarios.
To set the server-side template use the RowTemplate method.
<%= Html.Telerik().Grid<EditableCustomer>()
.Name("Grid")
.RowTemplate((c, grid) =>
{
%>
<div class="employee-details">
<img src='<%= Url.Content("~/Content/Grid/Customers/" + c.CustomerID + ".jpg") %>' alt='<%= c.ContactName %>' />
<ul>
<li><label>Name:</label><%= c.ContactName %></li>
<li><label>Country:</label><%= c.Country %></li>
<li><label>Address:</label><%= c.Address %></li>
</ul>
</div>
<%= grid.EditButton(c) %> <%= grid.DeleteButton(c) %>
<%
}
)
%>
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.