I have a SlickGrid in which the user can choose various datasets. Thus the schema can change. So when the user selects a new dataset, I need to either delete the SlickGrid and start over, or clear the existing one.
What is the proper approach? Should I just delete the DOM node? I have looked through the API and cannot find any grid level calls that appears to accomplish what I am looking to do.
thanks
Use Data view and "OnChange()" call following lines,
grid.invalidateAllRows();
dataView.setItems(newData, "Id");
grid.render();
If your not using dataview try this,
var data = []; \\or new array
grid.setData(data);
grid.render();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With