Categories | Question details Back To List | ||
treegrid sum using xml 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. <cell tyep="math"> =sum</cell> is what I have given in the xml.. am I doing something wrong ? Answer posted by dhxSupport on Jul 30, 2009 01:44 You should use "type" attribute, not "tyep": <cell type="math">=sum</cell> Answer posted on Jul 30, 2009 01:50 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. Answer posted by dhxSupport on Jul 30, 2009 01:53 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". Answer posted by Sanju Thomas on Jul 30, 2009 10:35 here is the code and xml I uses.. what am I doing incorrect ? code ------- <link rel="STYLESHEET" type="text/css" href="js/dhtmlxTreePro/js/grid/dhtmlxgrid.css"> <script src="js/dhtmlxTreePro/js/dhtmlxcommon.js"></script>
<body onload="doInitGrid();">
var mygrid; function doInitGrid(){ mygrid = new dhtmlXGridObject('mygrid_container'); }
</script>
xml ---- <?xml version="1.0" encoding="UTF-8"?> <row id="ABC Division#Last 90 Days"> Answer posted by dhxSupport on Jul 31, 2009 01:45 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) |