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

How to invert value of checkboxes

2 Answers 213 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Luis
Top achievements
Rank 1
Luis asked on 13 Dec 2012, 03:40 AM
Hi, i'm currently using the treeview component with two levels of checkboxes. I have to invert the selected values of them. My problem is that when I manually change the child check values, they don't trigger their change event so I have call the event handler manually too, that way the parent values don't change either. Is there a way to do this using the treeview object? By the way, I tried using .click() with the child checks, but it made the browser crash.

Thanks for your answers!    

2 Answers, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 14 Dec 2012, 05:00 PM
Hello Luis,

I am afraid the TreeView does not support such built-in check/uncheck methods which you can use. If you like you can suggest an idea on our KendoUserVoice page.

Kind Regards,
Petur Subev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Gary
Top achievements
Rank 1
answered on 15 Jan 2013, 09:48 PM
$("#someTreeView").kendoTreeView({
    dataSource: yourDataSource,
    checkboxes: true,
    select: function (e) {
       e.sender.dataItem(e.node).set("checked", true);
    }
});        

See if this works for you. Seems that as the data Item is an Observable, setting "checked" works.

Gary
Tags
TreeView
Asked by
Luis
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Gary
Top achievements
Rank 1
Share this question
or