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

TriState and

1 Answer 57 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Oren
Top achievements
Rank 1
Oren asked on 31 Jan 2011, 07:48 AM
Hello,

I use a treeview include tristate mode.
My problem is that:

When i get the checkeble nodes with the following js function,
 var nodes = treeview.get_checkedNodes();
I get also the parent node that its state is indeterminate.

[¦] Parent
    [X] Child 1
    [X] Child 2
    [  ] Child 3

Is there any way to get only the checkeble nodes with no indeterminate state?

Thanks,
Oren

1 Answer, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 31 Jan 2011, 08:56 AM
Hi Oren,

I tried following approach to get the checked nodes when using TriState cehckboxes.

Client Code:
function getChecked() {
    var tree = $find("<%= RadTreeView1.ClientID %>");
    var allNodes = tree.get_allNodes();
    var chekedIndex = 0;
    var checkedNodes = new Array();
    for (var index=0; index < allNodes.length; index++) {
        if (allNodes[index].get_checkState() == 1) {
            checkedNodes[chekedIndex] = allNodes[index];
            chekedIndex++;
        }
    }
    alert(checkedNodes.length);
}



Thanks,
Princy.
Tags
TreeView
Asked by
Oren
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or