This is a migrated thread and some comments may be shown as answers.

Batch Editing Grid input doesn't have kendo style

1 Answer 53 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Gaetan
Top achievements
Rank 1
Gaetan asked on 15 Mar 2016, 04:50 PM

I define a batch editing grid with the wrapper ASP.NET MVC, exactly like the demo : http://demos.telerik.com/aspnet-mvc/grid/editing

But the result is different. Fields that appear when editing a cell are not kendo widget.

By example, the unit price field is a simple input tag with the class "text-box". It's not a kendo widget numerictextbox.

 

I make a sample project with exactly the same file editing.cshtml.

1 Answer, 1 is accepted

Sort by
0
Accepted
Dimiter Topalov
Telerik team
answered on 17 Mar 2016, 12:33 PM
Hi Gaetan,

You need to apply the appropriate DataType attributes to the corresponding properties of the View Model in order to make the application use the Editor Templates, specified for the given data type:

ProductViewModel.cs:

[DisplayName("Unit price")]
[DataType(DataType.Currency)]
[Range(0, int.MaxValue)]
public decimal UnitPrice
{
  get; set;
}
 
[DisplayName("Units in stock")]
[DataType("Integer")]
public int UnitsInStock
{
  get; set;
}

I hope this helps.

Regards,
Dimiter Topalov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
Gaetan
Top achievements
Rank 1
Answers by
Dimiter Topalov
Telerik team
Share this question
or