Hello,
When I use AJAX/KO to pull in data for the grid and bind, everything pops up great. If I go out and pull more information (and I want to wipe the current grid entirely), the data comes back and because it's completely different, the grid things I've deleted a ton of rows. How can I ignore that and completely wipe it clean when I rebind?
The console also tells me to add a primaryKey, but I am using one. Not sure why it keeps telling me that.
Thanks,
Alex
Hi, Alex.
You can rebind the grid with new data source using the following code:
$(".selector").igGrid("option", "dataSource", newDS);
$(
".selector"
).igGrid(
"option"
,
"dataSource"
, newDS);
By setting the data source, the grid will rebind the data internally.
I guess when you are using the Knockout JS, you are using our grid extension for that library. You can check this sample, if you need additional information on that. But even if you are using the knockout, by using the code above, the grid should behave normally, and update the other elements that are bound to the Knockout Model.
It the issue still persist, I will be glad to have more detailed information about your case. Thank you in advance.
Best regards, Nikolay Alipiev
Hello Alex,
Do not hesitate to contact me if you have any additional questions regarding this matter.