cgcgames -1 Junior Poster in Training

I am having some trouble in this one area. What I am trying to do is get a treeview that loads from the database. which I have done and it loads all the way to the final data. but what I want it to do is make a conection to the database when the user makes a selection in the final view.

The only way I can see this working is getting another bit of information. the information I need is where they are in the tree view. so i put in a after expand and put the code name2 = TreeView.SelectedNode.Text; I needed that so I can right my sql statment when the user selects somthing in the final view. and for the most part this works. however if the user doesnt click on the text to expand it, it doesnt change the selected node. Basicly meaning if they use the + to expand the view it wont change the selected node.

is there anyway to make the selected node the node that just expanded. If i can do somthing like that my code will work.

if you didnt understand what i was meaning please let me know and ill try and make it more clear.

Thanks,
Cgcgames

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.