Best way to refresh data in a grid?

I’m loading a grid using grid.load(datasource.php), and want to periodically refresh all the data that is shown.

I’ve tried calling just grid.load() again, but it seems to muck up the data I already have in there (I do a lot of post-processing on the data).

So I’ve tried doing a grid.clearAll() before the load(), but this causes a few seconds (datasource is slow) of the grid being visibly empty.

Is there anyway to call .clearAll() once the AJAX request has been returned, but before it adds it all to the table?

Thanks

Try using mygrid.clearAndLoad()

Is there anyway to call .clearAll() once the AJAX request has been returned, but before it adds it all to the table?
Unfortunately it not possible. As a workaround you can show some notification that will inform user that data is loading. Please check example here dhtmlx.com/docs/products/dht … ation.html

clearAndLoad worked for us as suggested for by vnramp! Thanks!

Olga, is there any downside to this? Is it incorrect?

Thanks!