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

[Solved] Kendo UI Grid Numeric Textbox issue

1 Answer 177 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Samir
Top achievements
Rank 1
Samir asked on 26 Feb 2015, 11:14 AM
Hello,

I have created Numeric textbox in Grid. I Don't want it to accept decimal. Why does it accept decimal? I dont want to use custom editor to specify decimal places.

dataSource = new kendo.data.DataSource({
            data: myArray, //empty data
            schema: {
                model: {
                    id: "id",
                    fields: {
                       
                        MINUTES: {
                            type: "number", validation: {
                                decimals: 0,
                                required: true,
                                min: 0
                            }, format: '0.'
                        },

It should accept only number. Please help.


1 Answer, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 02 Mar 2015, 10:13 AM
Hi Samir,

The NumericTextBox widget accepts decimals by default, unless the current culture is not configured otherwise. In your case you can either use custom editor function or modify the culture (see proof of concept example).

Regards,
Alexander Popov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Samir
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Share this question
or