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

select and highlight a node on pageload

1 Answer 37 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Regeesh Joseph
Top achievements
Rank 1
Regeesh Joseph asked on 17 Aug 2010, 06:12 AM
Hai,

How to get a node selected and highlighted it with a different color on pageload. I have tried selectedNode, selectedText but in vein.

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 17 Aug 2010, 06:22 AM
Hello Rageesh,


Have a look at the following code which I tried for similar kind of scenario.

C#:
protected void Page_Load(object sender, EventArgs e)
{
    RadTreeView1.Nodes[2].Selected = true;
    RadTreeView1.SelectedNode.CssClass= "highLight";
}

CSS:
.myClass
{
    background-color: Green !important;
    background-image: none !important;
}



-Shinu.
Tags
TreeView
Asked by
Regeesh Joseph
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or