TreeGrid ed[=sum] breaks on empty cell data

I have a TreeGrid initialized with the following column types.



myGrid.setColTypes(“tree,ed[=sum],ed[=sum]”)



If I load the 2nd or 3rd columns with no cell data, the cell reports “=sum” and the sum reports “NaN”.

Rather the TreeGrid should interpret a no data cell as 0 when summing and display an empty cell.



Here’s the xml to load into the above grid to reproduce this problem: (Column 1 of “Sub 1”)





Totals

Sub 110

Sub 22010

Sub 32010







Thanks,



Terbeaux333

To fix this issue you can do the following:
set default value for the 2nd and 3rd columns:
mygrid.setColTypes(“tree,ed[0],ed[0]”)

Define 2nd and 3rd cell’s types at the parent row via xml:


Totals
Sub 110
Sub 22010
Sub 32010
=sum
=sum




Most excellent.  Your solution worked well.  However, after you guys led me down the right path, I found it better to do the following:

myGrid.setColTypes(“tree,ed,ed”)  
// No default specified


Then with my data, provide the following.

 
 
  Totals=sum=sum
    Sub 110 
    Sub 22010 
    Sub 32010 
 


This gave me the ability to have cells and still have my summation work properly.

Thanks a bunch guys!!

Terbeaux333