Emptying a grid in kendo UI after receiving erroneous data

58 views Asked by At

The kendoUI grid on which I am working on is refreshed when you pass new data with the datasource, which is fine, but I need to empty it when an error or an action occurs.

So, how can I empty and refresh the kendoUI grid manually.

Thanks in advance

1

There are 1 answers

1
Priyank Sheth On BEST ANSWER

Can you give this a try:

$("#yourGridId").empty(); // Empty the grid.
$("#yourGridId").data('kendoGrid').refresh(); // Refrsh the grid.

Hope this will solve your problem.