I am using Kendo grid
.
I want to remove all rows from Kendo grid
using JavaScript
.
I removed them using a for loop but I want to find the best way to remove all rows.
I am using Kendo grid
.
I want to remove all rows from Kendo grid
using JavaScript
.
I removed them using a for loop but I want to find the best way to remove all rows.
If you are working with Angualrjs, then try to follow this code:
Where
gridData
isk-data-source="gridData"
This worked fine for me.
try following code.
for demo click here
That doesn't really move the underlying data of the grid, it just clears the rows being displayed. If you sort the "empty" grid, all the rows reappear form the underlying data.
If instead of removing your data as shown like this:
and instead replace it with a new array of data, say called result.Data.. like this:
you will see the data swap, but if sort or page, again the original data is shown.
Anyone know how to actually change the data and have the new data replace the source data of the grid?
UPDATE: The answer is to ALSO use the setDataSource method: