Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Rosario on Sep 08, 2009 00:55
open dhtmlx forum
Numer format

I would like to format the value in column in the following way: 134,500.07.
I performed the following instructions:

mygrid.setColTypes ( "ro, txt, ed, ed, edn, edn, ed");
mygrid.setNumberFormat ( "0000.00", 4);

but the result is wrong, "134500.070000"

Thanks in advance
Answer posted by dhxSupport on Sep 08, 2009 03:26
>>mygrid.setNumberFormat ( "0000.00", 4);
At the last version of dhtmlxGrid this command renders cell values like "134500.07".
Please find more information about formatting numeric values in grid here http://dhtmlx.com/dhxdocs/doku.php?id=dhtmlxgrid:formatting_numeric_values&s[]=setnumberformat
http://dhtmlx.com/dhxdocs/doku.php?id=dhtmlxgrid:api_method_dhtmlxgridobject_setnumberformat
Answer posted by Support on Sep 08, 2009 07:32
>>mygrid.setColTypes ( "ro, txt, ed, ed, edn, edn, ed");
You are using incorrect syntax of the command - white-spaces between parameter are not necessary and may break further processing. 
mygrid.setColTypes ( "ro, txt, ed, ed, edn, edn, ed"); //incorrect
mygrid.setColTypes ( "ro,txt,ed,ed,edn,edn,ed"); //correct