Telerik Extensions for ASP.NET MVC

Version Q1 2012, released 04/19/2012

Edit Template

Product Details

About this example ASPXRazor

This example shows how Telerik NumericTextBox for ASP.NET MVC can be used to edit Model property.

To use specific editor template, you should first decorate the edited property of your model with System.ComponentModel.DataAnnotations.DateType attribute:

        [DataType("Number")]
        public int UnitsInStock
        {
            get;
            set;
        }

        [DataType(DataType.Currency)]
        public decimal UnitPrice
        {
            get;
            set;
        }

You can review EditableProduct.cs file for more information.

The next step is to create user control, which will be used to edit the Model property. In this demo Integer.ascx is used to edit the UnitsInStock property and Currency.ascx is used to edit the UnitPrice property.

Get more than expected!

Take the Telerik Extensions for ASP.NET MVC to your Visual Studio projects to truly experience their power. Download your free copy now and jumpstart your development with the available learning resources.

The Extensions are offered in both open source and commercial versions the differences between which are well explained in the licensing FAQ.

If you have any questions, do not hesitate to contact us at sales@telerik.com.

Other Demos: