This is a migrated thread and some comments may be shown as answers.

Filter persists on reload of data

2 Answers 105 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Madzie
Top achievements
Rank 1
Madzie asked on 20 Nov 2013, 05:07 AM
Hi, 
Using the Kendo grid in Single Page Application using MVVM.
The filtering is only at client side, so when the user filters once on a column (say it has only one row) and then next reloads new data to the grid -the filter persists on the grid. It should ideally clear the filter off and reload fresh data without filters.
How is that possible (how to enforce it since it is not happening as expected)

2 Answers, 1 is accepted

Sort by
0
Accepted
Alexander Valchev
Telerik team
answered on 20 Nov 2013, 03:24 PM
Hello Madzie,

By default data re-reading does not clear the DataSource filters. You can clear them manually by passing an empty array as argument of the filter method.
grid.dataSource.filter([]);


Regards,
Alexander Valchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Madzie
Top achievements
Rank 1
answered on 20 Nov 2013, 07:04 PM
Great Thanks ! It works
Tags
Grid
Asked by
Madzie
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Madzie
Top achievements
Rank 1
Share this question
or