5. Calculation order in tree
When the particular parent and child rows are calculated
- By default are parent row's children cells calculated before the parent row's cells.
You can change this direction by adding '*' to
CalcOrder
to position, where you want to calculate the children.
- For more complex calculation order you can divide CalcOrder attributes to more parts (CalcOrder,CalcOrder1,CalcOrder2,...)
and reference these orders from parent row's CalcOrder by *,*1,*2,...
- In this example is used this calculation order:
- First are calculated columns Total and Tmp upstairs (child rows before parent).
The Tmp column is used only as temporary and should be hidden by setting Visible='0' and CanHide='0'.
- Next are calculated columns PerParent and PerTotal downstairs (parent before child rows).
Because formulas in these columns use calculated result Total from fixed Root row.
- Because of complex calculation order, the
Recalc
attribute of all rows is set to 256 to recalculate the whole grid after any change.
- If you have more fixed rows and you want to calculate their cells in specific order, you can use <Cfg> attribute CalcOrder instead of CalcOrder in fixed rows.