is the a way I can tell treeGrid to sum all the child nodes using xml ? I tried with cell type math, it did not work for some reason.
=sum is what I have given in the xml… am I doing something wrong ?
You should use “type” attribute, not “tyep”:
=sum
Correct I was using type… not “tyep”… it was typo …
but it still shows “=sum” as value… I don’t want to change the columnType, I have a custom colum type for some other purpose.
To calculate summ of the child nodes you should use “math” type. Or you should customize your custom eXcell type that it will make necessary math calculations if cell value is “=sum”.
here is the code and xml I uses… what am I doing incorrect ?
code
-------
<script src=“js/dhtmlxTreePro/js/dhtmlxcommon.js”>
<script src=“js/dhtmlxTreePro/js/grid/dhtmlxgrid.js”>
<script src=“js/dhtmlxTreePro/js/grid/dhtmlxgridcell.js”>
<script src=“js/dhtmlxTreePro/js/grid/dhtmlxtreegrid.js”>
<script src=“js/dhtmlxTreePro/js/dhtmlxtree_er.js”>
<script src=“js/dhtmlxTreePro/js/grid/dhtmlxtreegrid.js”>
<script src=“js/dhtmlxTreePro/js/grid/ext/dhtmlxtreegrid_lines.js”>
<script src=“js/dhtmlxTreePro/js/grid/ext/dhtmlxgrid_math.js”>
xml
----
<?xml version="1.0" encoding="UTF-8"?>
ABC Division=sum=sum=sum
Last 30 Days102030
Last 60 Days102030
Last 90 Days102030
Please check if getVaue() method of the “er” eXcell type returns numeric value. If issue still occurs please provide us code of your custom eXcell type (you can send it directly to the support@dhtmlx.com)