0

I have a grid with filters working fine. My issue is, if I give 1.00 in the search field. It shows the result with data 1.00, 10.00, 100.00, etc. I want only to show the result with data 1.00 only. The following is my code:

me.grid.store.filter(key, values[key]);

Here, 'key' is the column name and 'values[key]' is the text that is entered in search field. I think this filter rounds off my number.

Help me. Thanks in advance.

1 Answers1

0

The field you are trying to filter by is apparently text. Change the field type to 'int' of 'float' and it should work.

Saki
  • 5,827
  • 2
  • 15
  • 15
  • 2
    I had given the field as numbercolumn with following properties. col.xfilter.xtype = 'numberfield'; col.xfilter.fieldCls='xfilterCls'; col.xfilter.decimalPrecision = 5; col.xfilter.hideTrigger = true; – YASEER ARAFATH Jun 13 '14 at 10:56
  • 1
    I mean data field in the model configuration, not grid column. – Saki Jun 13 '14 at 10:58
  • 2
    It is already in float. I think, if the value is 10.00 it takes the value as 10 and if the value is 10.01 it takes the value as 10.01 because of the default javascript parseFloat behaviour. – YASEER ARAFATH Jun 13 '14 at 11:00
  • 2
    It neglects zero after decimal point. I want to remove that behaviour of removing zero after decimal point. – YASEER ARAFATH Jun 13 '14 at 11:03