Telerik Extensions for ASP.NET MVC

Version Q2 2012, released 06/07/2012

Custom ToolBar Template

select
Customer Details
Order IDCompany NameShip AddressOrder Date
10248Vins et alcools Chevalier59 rue de l'Abbaye07/04/1996
10249Toms SpezialitätenLuisenstr. 4807/05/1996
10250Hanari CarnesRua do Paço, 6707/08/1996
10251Victuailles en stock2, rue du Commerce07/08/1996
10252Suprêmes délicesBoulevard Tirou, 25507/09/1996
10253Hanari CarnesRua do Paço, 6707/10/1996
10254Chop-suey ChineseHauptstr. 3107/11/1996
10255Richter SupermarktStarenweg 507/12/1996
10256Wellington ImportadoraRua do Mercado, 1207/15/1996
10257HILARION-AbastosCarrera 22 con Ave. Carlos Soublette #8-3507/16/1996
Displaying items 1 - 10 of 830

About this example ASPXRazor

This example demonstrates how to use a custom toolbar template in Telerik Grid for ASP.NET MVC. The template can be declared through the ToolBar's Template method. In this particular example the template is used as a container for a filtering ComboBox.

To define a custom template use the following code

<% Html.Telerik().Grid(Model)
        .Name("Grid")
        .ToolBar(toolBar => toolBar.Template(() =>
        { 
            %>
            <label>Show orders for customer:</label>
            <%= Html.Telerik().ComboBox()
                    .Name("Customers")                                               
            %>
            <% 
        }))
        .Render();
%>

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: