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

The change event is not fired when applying a filter

2 Answers 431 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Gers
Top achievements
Rank 1
Gers asked on 12 Feb 2016, 10:32 PM

I'm using a treeList, I want to do an action whenever the filter is used. I'm trying to do that with the change event but this is not working.

According to the documentation ,the Change event is " Fired when the data source is populated from a JavaScript array or a remote service, a data item is inserted, updated or removed, the data items are paged, sorted, filtered or grouped." But the change event doesn't get fired in my case.

Is there a way to know when the filter is used ?

Here is my code:

 $("#treeList").kendoTreeList({
      columns: [
        { field: "name" },
        { field: "age" }
      ],
      dataSource: [
        { name: "Jane Doe", age: 30 },
        { name: "John Doe", age: 33 }
      ], 
      change: function(e) {
        console.log("not fired when applying filter");
                          },
      selectable: "multiple, cell",
      filterable: true
    });
    var treeList = $("#treeList").data("kendoTreeList");

2 Answers, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 16 Feb 2016, 10:09 AM

Hello Gers,

 

This is true for the DataSource change event. However in the code bellow you are handling change event of the TreeList which is only triggered by selection.

 

Regards,
Nikolay Rusev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Gers
Top achievements
Rank 1
answered on 16 Feb 2016, 03:21 PM
Perfect, you are the man Nikolay Rusev !!!
Tags
TreeList
Asked by
Gers
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Gers
Top achievements
Rank 1
Share this question
or