Dynamic content in Grid Footer


I have a grid with three columns: quantity, price, and total.  quantity and price are simple integer columns, while total is a math cell with [=c0*c1] as the formula.  Total displays the product of quantity and price. 



I then have a footer which displays two totals; one for the quantity total and the other for the sales total.  When the grid initially loads the quantity total displays fine, but the sales total is 0.  Only after I edit a cell does the sales total in the footer display the correct number (because the footer is refreshed on cell edit similar to your sample content).  I believe the problem is that the footer content is refreshed before the third column has a chance to compute the math formula so the footer calculation initially sees all zero values for that column.



I am using the .loadXML() method and the callback feature to initially populate the footer content.  I think that this is a bug and the callback needs to wait until math functions in the grid have all completed rather than executing as soon as the XML is loaded into the grid structure.

The values in math cell calculated immideatly while creating, it also recalculates
exactly after any cell included in math updated. If on moment of
calculation, some data not present in grid yet - the row marked as
incorrect calculated, and after some timeout ( 300ms ) the new attempt to
calculate initiated.

So while all calculations can be ready on moment of grid loading, for some cells, data can appear significently later. We plan to add the additional event , which will fire when all math calculated, if you need such update ASAP - please contact us directly at dhtmlx@scand.com