Hi,
I have a simple grid where the last column should be a total of the row and the last row has cells that are a total of the column.
My grid code is something like:
[code]
…
mygrid.setHeader(“A,B,C,D”);
mygrid.setColumnIds(“1,2,3,4”);
mygrid.setColTypes(“edn,edn,edn,edn”);
mygrid.setNumberFormat(“0,000.00”,0,".",",");
mygrid.setNumberFormat(“0,000.00”,1,".",",");
mygrid.setNumberFormat(“0,000.00”,2,".",",");
mygrid.setNumberFormat(“0,000.00”,3,".",",");
mygrid.parse(…parse the xml below…);[/code]
The XML:
<rows>
<row id="r1">
<cell>33512.0246</cell>
<cell>32264.345</cell>
<cell>44600.0346</cell>
<cell>=c0+c1+c2</cell>
</row>
<row id="r2">
<cell>11243.993</cell>
<cell>11897.6817</cell>
<cell>12520.3835</cell>
<cell>=c0+c1+c2</cell>
</row>
<row id="r3">
<cell>2</cell>
<cell>4</cell>
<cell>5</cell>
<cell>=c0+c1+c2</cell>
</row>
<row id="r4">
<cell>=[[r1,0]]+[[r2,0]]+[[r3,0]]</cell>
<cell>=[[r1,1]]+[[r2,1]]+[[r3,1]]</cell>
<cell>=[[r1,2]]+[[r2,2]]+[[r3,2]]</cell>
<cell>=[[r1,3]]+[[r2,3]]+[[r3,3]]</cell>
</row>
</rows>
But the cells with the formulas are just printing out the formula instead of the value of the formula, e.g. =[[r1,0]]+[[r2,0]]+[[r3,0]] instead of the actual value.
And when I add the following :
mygrid.setNumberFormat("0,000.00",0,".",",");
mygrid.setNumberFormat("0,000.00",1,".",",");
mygrid.setNumberFormat("0,000.00",2,".",",");
mygrid.setNumberFormat("0,000.00",3,".",",")
;
Then the formula cells all say “NaN”.
Any help is appreciated.
Thanks