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

datasource event change

1 Answer 125 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Michelle
Top achievements
Rank 1
Michelle asked on 22 Jul 2014, 08:38 PM
I copied the demo code for grabbing selected nodes. This is bound to dataSource.bind("change", function). Is there anyway to specify what kind of change to the dataSource. In my case, I want to bind specifically to a check or an uncheck of a checkbox. I would like it to discern between that and appending nodes to the tree and other changes to the dataSource.

1 Answer, 1 is accepted

Sort by
0
Alex Gyoshev
Telerik team
answered on 23 Jul 2014, 12:57 PM
Hello Michelle,

The e.field property of the event arguments contains the changed property. You can check for the checked property like this:

dataSource.bind("change", function(e) {
    if (e.field == "checked") {
        // ...
    }
});

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