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

TriState-Status

2 Answers 53 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
FLIDEV
Top achievements
Rank 2
FLIDEV asked on 06 Oct 2009, 08:31 AM
Hello,

I have an treeview with chekcboxes and tristatecheckboxes ist true. Is it possible to get the intermediate state of an parent node? The node is in the CheckedNodes-collection, but I can't find any property to differ the state.

I hope, anybody can help me.

Detlef!

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 07 Oct 2009, 07:13 AM
Hello,

You could use the CheckState property of RadTreeNode in order to check chckbox state.

C#:
 
protected void RadTreeView1_NodeCheck(object sender, Telerik.Web.UI.RadTreeNodeEventArgs e) 
    RadTreeNode node = (RadTreeNode)e.Node; 
    if( node.ParentNode.CheckState == TreeNodeCheckState.Indeterminate) 
    { 
        Response.Write("Intermediate"); // Intermediate state 
    } 

-Shinu.
0
FLIDEV
Top achievements
Rank 2
answered on 07 Oct 2009, 02:16 PM
Hello Shinu,

thank you for your answer. That is what I wanted.

Detlef!
Tags
TreeView
Asked by
FLIDEV
Top achievements
Rank 2
Answers by
Shinu
Top achievements
Rank 2
FLIDEV
Top achievements
Rank 2
Share this question
or