ClearAll doesn't update Stats in footer/header

Hi everybody.
Little problem.

I’m using a treegrid with a header with #stat_tree_total

All runs correctly, normally but not when i call clearAll() method. In this case the statistic are not updated (i’d like to read 0 or empty cell) mantaining the last stats. I just tried to use also clearAll(true) but is not what i want because also titles dissappear.

Is it a bug or i’ve to do something else ?

Many thanks.

P.S. i’m on 3.6 version.

I just solved calling mygrid.callEvent(“onGridReconstructed”,[]);

that force recalculation.

Anyway, in my opinion, it would be more logic that in ClearAll event the recalculation would be just included.

Thanks.

Unfortunately the the clearAll() method doesn’t refresh headers/footers. You may only call clearAll(true), it will remove your headers and footers and you will need to add them again.

As you mentioned to force the math calculations you need to use the onGridReconstructed event.