This question is locked. New answers and comments are not allowed.
Hi,
I have a question in MVC Treeview checkbox.
My tree looks like this:
root
level 1
level 11
level 12
level 13
In my program, I check the "level 11" node, and would like to know if its parent node "level 1" is check or not. I use the following logic in my code (onCheck method) but it deos not work. Please help. Thanks.
I have a question in MVC Treeview checkbox.
My tree looks like this:
root
level 1
level 11
level 12
level 13
In my program, I check the "level 11" node, and would like to know if its parent node "level 1" is check or not. I use the following logic in my code (onCheck method) but it deos not work. Please help. Thanks.
var
childrenChecked = $('#NoteTreeView > ul.t-group > li.t-item > ul.t-group > li.t-item:has(ul.t-group)').find("*:checkbox:checked").length;
if ($(this).parent().checked) {
childrenChecked = childrenChecked - 1;
}