TreeGrid provides additional set of built-in statistics counters (default statistics counters work only against visible rows, and will not work correctly in case of the treegrid where some rows can be hidden in closed branches). There are the following statistics counters available:
stat_tree_total - counts total of all values in a column;
stat_tree_total_leaf - counts total of all values in a column, but includes only values on the last level of the tree;
stat_tree_multi_total - counts total of column multiplication;
stat_tree_multi_total_leaf - counts total of column multiplication, but includes only values on the last level of the tree;
stat_tree_max - counts maximal value in a column;
stat_tree_max_leaf - counts maximal value in a column, but includes only values on the last level of the tree;
stat_tree_min - counts minimal value in a column;
stat_tree_min_leaf - counts minimal value in a column, but includes only values on the last level of the tree;
stat_tree_average - counts average value in a column;
stat_tree_average_leaf - counts average value in a column, but includes only values on the last level of the tree;
stat_tree_count - counts a real count of items in the TreeGrid;
stat_tree_count_leaf - counts a real count of items in the TreeGrid, but includes only values on the last level of the tree.