Telerik Extensions for ASP.NET MVC

Version Q2 2012, released 06/07/2012

Client Edit Templates

Order IDEmployeeOrder DateFreightEdit
No records to display.
Displaying items 0 - 0 of 0

About this example ASPXRazor

This example shows how to use client edit template with Telerik Grid for ASP.NET MVC. There are a few built-in templates for Date, Currency and Number editing which can be found in the EditorTemplates folder in the installation.

Decorate your model with metadata attributes to specify its data type, UI hint (name of the ASCX to use) etc:

    public class EditableOrder
    {
        [ReadOnly(true)]
        public int OrderID { get; set; }

        // EditorTemplates/ClientEmployee.ascx will be used as editor template.
        [UIHint("ClientEmployee"), Required]
        public string Employee { get; set; }

        // EditorTemplates/Date.ascx will be used as display template.
        [DataType(DataType.Date), Required]
        public DateTime OrderDate { get; set; }

        [DataType(DataType.Currency), Required]
        public decimal Freight { get; set; }
    }

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: