GibboK GibboK - 6 months ago 69
C# Question

Web Control TreeView select a Node programmatically

I use 4 and c#.
I have a TreeView and I would like select an existing node programmtically.

SelectNode() method is read only

so I do not know how to do it.
Please reply for a TreeView WEB CONTROL not for Win App.

My Code:

protected void uxTreeView_DataBound(object sender, EventArgs e)
TreeView myTreeView = (TreeView)uxManageSlotsDisplayer.FindControl("uxTreeView");
myTreeView.Nodes[2].Selected = true;

Answer Source

You can try setting the Selected property of a particular TreeNode.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download