Treeview node set focus question

K

Kay

Hi all,

Can anyone tell me how do I set focus on a particular treenode at run time?
If you need to know what I'm try to do please read on ...

I have a treeview to represent a Country/Product scenario (i.e. a country,
as parent node, produce 1 to many product, as childnode). When the user
click on one of the node a group of textbox/combo box etc will be populated
and if btnSave is clicked data will then be updated and the treeview will be
reloaded.

I'm trying to "remember" the selected node , it could be parent or child
node, and after the treeview is refreshed I want to set focus to the that
node again. However I can't find the focus method for a node.....anyone
know how?

Thx!

Kay
 
L

LinasB

Can anyone tell me how do I set focus on a particular treenode at run
time? If you need to know what I'm try to do please read on ...

I have a treeview to represent a Country/Product scenario (i.e. a country,
as parent node, produce 1 to many product, as childnode). When the user
click on one of the node a group of textbox/combo box etc will be
populated and if btnSave is clicked data will then be updated and the
treeview will be reloaded.

I'm trying to "remember" the selected node , it could be parent or child
node, and after the treeview is refreshed I want to set focus to the that
node again. However I can't find the focus method for a node.....anyone
know how?

Only TreeView has this method :
TreeView1.SelectedNode = YourRememberedNode

HTH, LinasB
 

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

Top