Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Tim Sanders on Nov 06, 2008 16:55
open dhtmlx forum
#numeric_filter on Price column doesn't handle > 1000 prices

I have a grid with a price column and a header #numeric_filter. Some of the prices are greater than 1000 and display with commas (e.g. $17,236.00). If I enter a filter for prices (e.g. "> 100") then any amounts with commas don't appear in the grid. It seems that any filtering of prices eliminates the values greater than 1000.

Thanks.
Answer posted by Support on Nov 10, 2008 02:34
Filter value > 1000 requires numeric data as the value. Probably, $17,236.00 is just a string.

Try to use edn-based excells in order to set numeric data as a real value and show the formatted value in grid. Format can be set using setNumberFormat method (only PRO edition). Please, see the sample in your package dhtmlxGrid/samples/cell_types/pro_excells_numberformat.html (or http://dhtmlx.com/docs/products/dhtmlxGrid/samples/cell_types/pro_excells_numberformat.html )



Answer posted by Tim Sanders on Nov 10, 2008 06:30
Thank you.  I figured out that the problem was caused by the server script formatting the data with commas.  I guess that caused the grid to treat the data as a string even though it was specified as a numeric column.  I removed the comma formatting from the server script and this fixed the problem.
Answer posted by Support on Nov 10, 2008 09:56
>>I removed the comma formatting from the server script
You can define column as ron or edn and assign necessary format by setNumberFormat ( it will not affect numeric filtering ) 
http://dhtmlx.com/docs/products/dhtmlxGrid/doc/articles/Cell_values_formating.html#grid_art_formatcells