Hi,
I’m having a problem formatting cells in a grid that use math formulas.
My code is something like this:
//set the col types for the 15 columns
mygrid.setColTypes("ro,ro,edn,edn,edn,edn,edn,edn,edn,edn,edn,edn,edn,edn,edn");
//set rounding
mygrid.setMathRound(2);
//set the number format for the last column which uses math formulas
mygrid.setNumberFormat("0,000.00",14,".",",");
mygrid.init();
//load the xml
mygrid.loadXML("data.xml");
//Hide the last column until data is entered into the grid
mygrid.setColumnHidden(14,true);
So I hide the last column until the user enters data into the grid and saves it.
When the user saves the data I do:
mygrid.clearAll();
mygrid.parse(xmlString);//this xml strings has the math calculations in it based on what the user entered
//show the last column which has the values of the math calculations
mygrid.setColumnHidden(14,false);
//set the number format for the last column
mygrid.setNumberFormat("0,000.00",14,".",",");
It is working fine except that the formating of the last column containing the formulas doesn’t seem to be working, one of the values in the last column is for example
1635154.12
but I would expect it to be
1,635,154.12
.
It is only the last column with formulas that are not formatted properly, the other cells where the user has entered data are formatted properly.
Any ideas?
Thanks