Hello,
my project uses the code snippet from the following example to construct the kendo grid:
http://demos.kendoui.com/web/grid/editing-inline.html
when clicking the "Edit" button to edit the "Units in Stock" value, i dont need to allow real numbers but only integers in the editor.
What is the editor template do i need to append here to strict kendoUI grid input only integer values in this column?
Thank you!
my project uses the code snippet from the following example to construct the kendo grid:
http://demos.kendoui.com/web/grid/editing-inline.html
when clicking the "Edit" button to edit the "Units in Stock" value, i dont need to allow real numbers but only integers in the editor.
UnitsInStock: { type: "number", validation: { min: 0, required: true } }
What is the editor template do i need to append here to strict kendoUI grid input only integer values in this column?
Thank you!
5 Answers, 1 is accepted
0
Igor
Top achievements
Rank 2
answered on 22 Jul 2012, 01:08 PM
I solved the problem, i've just had to add this:
in the column definition.
format: "{0:d}"
0
Igor
Top achievements
Rank 2
answered on 23 Jul 2012, 09:39 AM
Ah, when the value is "0", it will show "d" instead... What gives?
0
Accepted
Hello Igor,
Georgi Krustev
the Telerik team
Currently the number formatting of the KendoUI does not support "d" format. You can find more information about formatting here. I believe that you can use "{0:n0}", which will format numbers as integers.
Georgi Krustev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Igor
Top achievements
Rank 2
answered on 24 Jul 2012, 02:48 PM
Georgi, thanks!
It works for me
It works for me
0
Joshua
Top achievements
Rank 2
Iron
Veteran
Iron
answered on 11 Oct 2012, 06:44 PM
Where is it that I am supposed to add the format: "{0:n0}"? I have it in my model and on my column and every combination thereing, but it still lets me type in decimals.