Grid/treegrid resize issue

Hello!
You want to use grids and tree grids on reactive sites. However, there is a problem that you have to reload the data every time you reset it. Is there an option to just reload the grid, leaving the data still?

if($("#expandGrid").hasClass("is-active")){
    performanceTreeGrid.destructor();
    initPerformanceTreeGrid();
    fnLoadPerformance(_prams);
} else {
    performanceTreeGrid.destructor();
    initPerformanceTreeGrid();
    fnLoadPerformance(_prams);
}

It doesn’t work very well.
Please let me know if there is any other better way.

You may try to use the setColumns() method to rebuild grid with a new columns config: