Is there a way to pro-grammatically refresh the data in the grid without loosing any of the filtering or sorting settings of the currently displayed data?
Basically I want to have a button that when clicked will refresh the data from the server without losing the filter and sort info. We need this because the data we are viewing changes on the back end without the user being aware.
Thanks,
Paul
hey Robert,
do you have any updates on this? Is there anything i can help with if you still experience this issue?
Angel
Hello Angel.
it is strange. When I started from scratch to create a example application that exhibits the bad behavior, I can clearly see that recreating the grid in this way is possible and works. The only difference I can see between the example app which I sent to support and the code I pasted above is the quantity of data. There are no errors with the parsing of the json. Debugging tells me that the JSON array is good. The igGrid simply does not update using the code I pasted above. I'll let you know if I find the reason. Thanks for the feedback.
Robert
i am not sure what could be wrong. are you getting any errors? also could you change $.parseJSON(result.d) to just result.d, or simply "result" (without the quotes). I am not familiar with your grid configuration (which options are set, etc.) to be able to give you more details about it.
Hope it helps. Thanks,
I'm not the original poster. But my question is the same. I am calling igGrid in the success callback of jQuery.ajax() method like this:
success: function(result) {
if ($grid) {
$grid.igGrid("dataSourceObject", $.parseJSON(result.d));
$grid.igGrid("databind");
} else {
$grid = $(
this).igGrid({... ... ...
}
The grid does not update with the new data. What might I be doing wrong?
Thanks.
Hi,
your question was specifically about retaining the sorting and filtering presets. Otherwise it's possible to bind the grid locally, then refresh it via Ajax.