Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Alex on Aug 03, 2008 10:25
open dhtmlx forum
Precision inside Math Cells (grid)

Hello!!!

Is posible to change precision of cells? I would like to calculate "formula" with four (4) decimals , for example:

var = 1,500.1234 * 2.2345 / 1.3456
result:
var = 2,491.1012

If i would like to change the number format to ###.###,#### , math formula will work fine? for example:

var = 1.500,1234 * 2,2345 / 1,3456
result:
var = 2.491,1012


thanks
Alex
Answer posted by Support on Aug 04, 2008 05:19

If you are using pure math excells, the rounding can be set as

          grid.setMathRound(4);

it will define the rounging for result of all math operation. 

If you are using end|ron excell types - rounding can be set in default way ( by setNumberFormat("0,000.000") )
If you need store data with higher precision, than rendered in grid one - you can try to use next patch 
            http://dhtmlx.com/docs/products/kb/index.shtml?cat=search&page=1&q=3828&ssr=yes&s=precision