Treeview Web Control - selecting a node

R

Rod Early

Does anyone know how to programmatically select a tree node, either
with code or in the XML file supplied to the treeview control.

I can expand it by setting the EXPANDED attribute in the TreeNode
elements in XML. But I can't figure out how to select a particular
node even after it has been expanded to.

Thanks,
Rod Early
 
G

Guest

just set TreeView1.SelectedNodeIndex equals to the index
of the node with you want to select.
 
R

Rod Early

Thank you. I had been thinking that I could select a TreeNode element
in the same way that a dropdown listbox list element can be given a
SELECTED attribute. But as you say, it has to be set at runtime via
the SelectedNodeIndex property.

Thanks,
Rod Early
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top