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

Kendo UI grid Numeric filter not working

1 Answer 485 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Megha
Top achievements
Rank 1
Megha asked on 01 Feb 2016, 11:06 AM

I've created a demo page in JSfiddle, where you can see I've tried to use the number format and filterable to do the filtering for a numeric column. But if the data is suppose 0.23252 and my format condition "{0:n3}" and in filterable if I use the below function then the filtering is not working anymore. Please help. 

{
                ui: function (element) {
                    element.kendoNumericTextBox({
                        format: "n3",
                        decimals: 3
                    });
                }
 }

 http://jsfiddle.net/5EHqL/71/

 

Thanks,

Megha

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 01 Feb 2016, 02:53 PM
Hi Megha,

If you use the IsEqualTo filter function, the value from the filter must match exactly to the value in the data source, so if you are filtering with different value (changed due to the format or the decimals), the IsEqualTo will fail to match the values.

One option would be to keep the "format" of the NumericTextBox to "n3", but set higher value to the "decimals". However, you will still have to enter the entire value in the NumericTextBox and not the formatted value that is displayed in the grid. If you need only 3 decimals you could store the format data, which will allow the users to enter the same values that they are seeing in the grid while filtering.

Hope this helps.


Regards,
Konstantin Dikov
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
Megha
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or