Reload dhtmlxgrid without loosing filter information

I have a scenario in which user enters values in grid filter and then click on search button to get values from server as per filter params.
In this case if we clear and load grid we are loosing filter values. Is there any way by which we can just reload grid data with preserving filter values?

You need to save your filter states:
var val=mygrid.getFilterElement(col_ind).value()
reload your grid:
mygrid.clearAll(true);
mygrid.load(url)
apply filter values back:
mygrid.getFilterElement(col_ind).value(val);
force the filtration:
mygrid.filterByAll();

Thanks for reply.
But is there any other way by which we will just load data body not whole grid data.

you may reload only the data.
you may use:
grid.clearAndLoad(url);
or
grid.clearAll();
grid.load(url);

I am also having this issue.

This is what I am using but it’s not working.

Reload Data

What should I change to get the reload function working?

Thanks

the provided code reloads grid data well for us.

When I use the code that I posted, I lose the grouped information.

Is there anything I can run to give you a debug output?

I’m not sure what’s going wrong.

You need to call the groupBy() method after the loading data to the grid. grouped state is not saving after the data reloading.

Thanks,

I’ll give this a shot and report back. I appreciate you responding.

Unfortunately it’s not available to regroup the the grid after the data reloading.

Ahh ok that makes sense. Looks like I will have to remove that

Thanks

Unfortunately it’s not available to regroup the the grid after the data reloading.

I meant: unfortunately it’s not available to regroup the grid automatically after the data reloading.
So you will have to call groupBy method after the data is reloaded.