Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change Kendo Grid Filter Format

I have a field in my grid that are IDs that range from 1 to 2000. I have it designated as a number in the field definition.

The issue is when I use the filter and type in say "1000" when I return to the filter to put in another number it displays "1,000.00". I don't want the filtered text box to show the comma or decimal point. That format isn't relevant for this field.

How do I correct this?

Thanks in advance!

like image 270
Scot H Avatar asked Feb 15 '13 14:02

Scot H


Video Answer


1 Answers

While @Flores answer pointed me in the right direction, it did not do what was expected. At least I still had commas in my filter using his snippet. I ended up making a small modification to the code to achieve the desired result.

filterable: {
    ui: function (element) {
        element.kendoNumericTextBox({
            format: '#',
            decimals: 0,
        });
    },
},

That will give you only numbers. No commas and no decimals.

like image 86
Karthic Raghupathi Avatar answered Jan 01 '23 10:01

Karthic Raghupathi