Telerik Extensions for ASP.NET MVC

Version Q2 2012, released 06/07/2012

Server Row Template

Name
Filter
Company
Filter
Country
Filter
Address
Filter
Phone
Filter
Maria Anders

Maria Anders

Name:
Maria Anders
Company:
Alfreds Futterkiste
Country:
Germany
Address:
Obere Str. 57
Phone:
030-0074321
Edit
Ana Trujillo

Ana Trujillo

Name:
Ana Trujillo
Company:
Ana Trujillo Emparedados y helados
Country:
Mexico
Address:
Avda. de la Constitución 2222
Phone:
(5) 555-4729
Edit
Antonio Moreno

Antonio Moreno

Name:
Antonio Moreno
Company:
Antonio Moreno Taquería
Country:
Mexico
Address:
Mataderos 2312
Phone:
(5) 555-3932
Edit
Thomas Hardy

Thomas Hardy

Name:
Thomas Hardy
Company:
Around the Horn
Country:
UK
Address:
120 Hanover Sq.
Phone:
(171) 555-7788
Edit
Christina Berglund

Christina Berglund

Name:
Christina Berglund
Company:
Berglunds snabbköp
Country:
Sweden
Address:
Berguvsvägen 8
Phone:
0921-12 34 65
Edit
Hanna Moos

Hanna Moos

Name:
Hanna Moos
Company:
Blauer See Delikatessen
Country:
Germany
Address:
Forsterstr. 57
Phone:
0621-08460
Edit
Frédérique Citeaux

Frédérique Citeaux

Name:
Frédérique Citeaux
Company:
Blondel père et fils
Country:
France
Address:
24, place Kléber
Phone:
88.60.15.31
Edit
Martín Sommer

Martín Sommer

Name:
Martín Sommer
Company:
Bólido Comidas preparadas
Country:
Spain
Address:
C/ Araquil, 67
Phone:
(91) 555 22 82
Edit
Laurence Lebihan

Laurence Lebihan

Name:
Laurence Lebihan
Company:
Bon app'
Country:
France
Address:
12, rue des Bouchers
Phone:
91.24.45.40
Edit
Elizabeth Lincoln

Elizabeth Lincoln

Name:
Elizabeth Lincoln
Company:
Bottom-Dollar Markets
Country:
Canada
Address:
23 Tsawassen Blvd.
Phone:
(604) 555-4729
Edit
Displaying items 1 - 10 of 91

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.

Other Demos: