When the setOptions()
method is called, the Grid is destroyed and recreated. If the widget is bound to remote data, a new read request will be made:
There are couple of workarounds to avoid multiple calls:
1) You can retrieve the data independently from the Grid (e.g. via $.ajax()), and store it in a variable, then bind the Grid to this array instead of to the remote service:
2) If the Grid is loaded with the saved settings on page load, you can initially configure it with autoBind: false
, and then remove the autoBind property from the options object, before passing it to the setOptiions()
method. This approach will ensure that only one read request is fired (after the call to setOptions()
), but is applicable only if the Grid data is not supposed to be used before the call to setOptions()
(for example when the Grid is loaded on page load with different settings, based on the current user).
I hope this helps.
Telerik by Progress