Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Gigi on Jul 01, 2008 22:38
open dhtmlx forum
dhtmlxtreegrid total value with math formula

Hi,

I am using dhtmlx version 1.6 now.For dhtmlxtreegrid, I have taken summation of child record's total to parent row, and have done summation for each row across colums to "Total" column. In this dhtmlxtreegrid, if the child record values are 0, i am getting row wise sum across colum to the "Total" column as 0.Also i get column sum added to the parent row's cells as 0.So, parent rows cell in "Total" column also must be 0, but it is blank.How can i solve this issue?

Please see the following code
mygrid.setColTypes("tree,ro,txt,edn[=sum],edn[=sum],edn[=sum],edn[=sum],edn[=sum],edn[=sum],edn[=sum],edn[=sum],edn[=sum],edn[=sum],edn[=sum],edn[=sum],ron[=c3+c4+c5+c6+c7+c8+c9+c10+c11+c12+c13+c14]");

The xml for tree grid is


<rows>
<row id='1'>
<cell image='folder.gif'>MSCostParent</cell>
<row id='2'>
<cell><![CDATA[MSCost <IMG alt='hi' src='/Grid/imgs/dyn_blank.jpg'/>]]></cell>
<cell>null</cell>
<cell type='edn'></cell>
<cell type='edn'>0</cell>
<cell type='edn'>0</cell>
<cell type='edn'>0</cell>
<cell type='edn'>0</cell>
<cell type='edn'>0</cell>
<cell type='edn'>0</cell>
<cell type='edn'>0</cell>
<cell type='edn'>0</cell>
<cell type='edn'>0</cell>
<cell type='edn'>0</cell>
<cell type='edn'>0</cell>
<cell type='edn'>0</cell>
<cell type='ron'></cell>
</row>
</row>
</rows>
Answer posted by Support on Jul 02, 2008 02:40
Problem confirmed and fixed - please contact us directly at support@dhtmlx.com to receive updated js file.
Also, the xml must not contain type definition to the last cell, because it will disable math calculations

<cell type='edn'>0</cell>
<cell></cell>
</row>
</row>
</rows>