Treeview control - selecting a particular child node by coding
-
Hi i have a tree view control in my application. and they all have one level of child nodes. How can i select a particular child node by coding. eg, a 1 2 b 11 12 13 in this above how can i highlight the 12 node.i.e making the 12 node to look as if it is selected. plzz help. thanks in advance.........:confused:
-
Hi i have a tree view control in my application. and they all have one level of child nodes. How can i select a particular child node by coding. eg, a 1 2 b 11 12 13 in this above how can i highlight the 12 node.i.e making the 12 node to look as if it is selected. plzz help. thanks in advance.........:confused:
Hi! First you have to get a reference to the node you want to select and then you just have to call
myTreeView.SelectedNode = theNodeReference;
Regards, mav -- Black holes are the places where god divided by 0...
-
Hi! First you have to get a reference to the node you want to select and then you just have to call
myTreeView.SelectedNode = theNodeReference;
Regards, mav -- Black holes are the places where god divided by 0...
thanks for ur reply but then if u pass the node reference of a child node it is not accepting.... can u help me more plzzzzz
-
thanks for ur reply but then if u pass the node reference of a child node it is not accepting.... can u help me more plzzzzz
What do you mean by "it is not accepting"? Either you have a reference to an existing node anywhere inside your tree, in which case the mechanism is working, or you don't have a reference to an existing node, in which case I'd expect the treeview to not select anything. But without any code from your side it's impossible to tell what you did wrong.
Regards, mav -- Black holes are the places where god divided by 0...
-
Hi i have a tree view control in my application. and they all have one level of child nodes. How can i select a particular child node by coding. eg, a 1 2 b 11 12 13 in this above how can i highlight the 12 node.i.e making the 12 node to look as if it is selected. plzz help. thanks in advance.........:confused: