Hi,
I have an issue switching the data source of a grid. I need to change the source and the columns using the following calls:
element.jqxGrid(‘source’, );
element.jqxGrid(‘columns’, );
…which works fine. The problem is that if the user is currently on page 3 (say) of the current source, when I switch to the new source they are left on page 3 rather than resetting to page 0. This can display an empty grid if there isn’t enough data to reach to page 3. If I add the gotopage command:
element.jqxGrid(‘gotopage’, 0);
…the page number is reset – but I’m now getting 2 calls to request the data – one for the initial source change and another for the gotopage. The data requests could become expensive so I don’t want to be making 2 calls for the same data.
I’ve tried using beginupdate and endupdate but they seem to affect the rendering rather than the ajax requests to get the data in the first place.
Is there a way of preventing ajax data requests while the grid is being reset?
Thanks