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

TreeView Checkbox Changed

2 Answers 383 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Christopher
Top achievements
Rank 1
Christopher asked on 14 Aug 2013, 08:30 PM
Hi - In the following jsFiddle, I have some code to handle change events for checkboxes in a treeview:

jsFiddle

I'm wondering if there's a way inside the event handler to get a reference to the checkbox that triggered the event?  It seems like when checkChildren is enabled, it's possible for the change event to fire multiple times if checking a child triggers the checking of a parent (ie, the child was the last unchecked checkbox under the parent) so I need to evaluate the specific checkbox that raised a change event to determine whether or not to run additional code.

Thanks!

2 Answers, 1 is accepted

Sort by
0
Accepted
Alex Gyoshev
Telerik team
answered on 15 Aug 2013, 08:39 AM
Hello Christopher,

You can use the checkbox change event instead of the datasource change event -- http://jsfiddle.net/YdmJE/1/

Regards,
Alex Gyoshev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Christopher
Top achievements
Rank 1
answered on 15 Aug 2013, 01:38 PM
Thanks Alex, that's exactly what I needed!
Tags
TreeView
Asked by
Christopher
Top achievements
Rank 1
Answers by
Alex Gyoshev
Telerik team
Christopher
Top achievements
Rank 1
Share this question
or