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

How to identify if a filtering action occurred on grid

2 Answers 99 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Madzie
Top achievements
Rank 1
Madzie asked on 19 Dec 2013, 02:52 AM
Hi Team,
I have been observing that "Change" is the event that is called either when the datasource is populated or when a filtering happens on the grid.
i would like to identify these two actions separately. How's that possible with Kendo grid !
Infact, it would be happy to not call the "Change" event on filtering.

Looking for answers on this. Thanks in advance for the replies.

2 Answers, 1 is accepted

Sort by
0
Madzie
Top achievements
Rank 1
answered on 19 Dec 2013, 07:22 AM
Any pointers on this please !
0
Vladimir Iliev
Telerik team
answered on 19 Dec 2013, 02:23 PM
Hi Madhuri,

In the "change" event handler you can access the dataSource and check if there is filter applied - please check the example below:
function onChange(e) {
    var dataSource = this;
    if (dataSource.filter() !== undefined) {
        console.log("filter is applied");
    }
}

 Kind Regards,
Vladimir Iliev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Madzie
Top achievements
Rank 1
Answers by
Madzie
Top achievements
Rank 1
Vladimir Iliev
Telerik team
Share this question
or