| Sample: dhtmlxGrid | Math calculations | dhtmlxGrid main page |
Calculate values with Math formulas. Edit formulas on the fly
<div id="gridbox" width="100%" height="250px" style="background-color:white;overflow:hidden"></div> <script></script>mygrid = new dhtmlXGridObject('gridbox'); mygrid.setImagePath("../../codebase/imgs/"); mygrid.setHeader("Book Title,Author,Price,Quantity,Total"); //5th column is math mygrid.setColTypes("ed,ed,ed,ed,ed[=c2*c3]"); //round all calculation to 2 digits after point mygrid.setMathRound(2); //enable formula edition, disabled by default mygrid.enableMathEditing(true); mygrid.init(); mygrid.loadXML("grid_math.xml"); //xml contatain special math for last row to calculate grand total
| © DHTMLX LTD. All rights reserved |