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

batch editing input mask

2 Answers 57 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jerry
Top achievements
Rank 1
Jerry asked on 18 Sep 2012, 05:49 AM
Hi there,


I have implemented batch editing, inline editing for my grid. everything is working perfectly. But I have a column, which only suppose to be decimal. I try to enforce some kind of mask during editing.

I have looked at example, but I don't get it how this example works. Do I need to specify anything to make my column use Number.cshtml editor template?

thank you

regards
Jerry

2 Answers, 1 is accepted

Sort by
0
Accepted
Petur Subev
Telerik team
answered on 21 Sep 2012, 07:04 AM
Hello Jerry,

Yes you need to use the data annotation attributes. Here is how the model from the demo looks like:
[Required]
[DisplayName("Unit price")]
[DataType(DataType.Currency)]
public decimal UnitPrice
{
    get;
    set;
}
 
[Required]
[DisplayName("Units in stock")]
[DataType("Integer")]
public int UnitsInStock
{
    get;
    set;
}


Regards,
Petur Subev
the Telerik team
Check out the successor of Telerik MVC Extensions - Kendo UI for ASP.NET MVC - and deem it for new ASP.NET MVC development.
0
Jerry
Top achievements
Rank 1
answered on 24 Sep 2012, 10:41 PM
thank you so much Petur.
Tags
Grid
Asked by
Jerry
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Jerry
Top achievements
Rank 1
Share this question
or