This is a migrated thread and some comments may be shown as answers.
how to set default selected(hightlighted) node in radtreeview
1 Answer 94 Views
This is a migrated thread and some comments may be shown as answers.
JJ
Top achievements
Rank 1
JJ asked on 08 Jan 2013, 05:06 PM
how to set default selected(hightlighted) node in radtreeview on server side?

On my notes tree, first level is color, size, inside color has red, blue...
how to say if tree node name ="red", then select the red node as default (hight lighted)?

I tried below, but doesnt' work for me

 

 

RadTreeNode node = radTVActions.FindNodeByValue("Red");

 

 

 

if (node != null)

 

{

node.Selected =

 

true;

 

}



Thanks

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 1
answered on 09 Jan 2013, 04:26 AM
Hi,

Try the following code snippet to achieve your scenario.

C#:
RadTreeNode node = radTVActions.FindNodeByValue("Red");
if (node != null)
 {
    node.Selected = true;
    node.Expanded = true;
    node.ExpandParentNodes();
    node.Focus();
 }

Hope this helps.

Regards,
Princy.
Asked by
JJ
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 1
Share this question
or