Databound TreeView

ijenkins

New member
Joined
Sep 1, 2004
Messages
1
Programming Experience
1-3
I am working on a project that uses a treeview that has three levels. Each level is coming from a different table in my database. It is being populated at run time by looping through 3 datatables. Everything works fine. Just for some background this is what it might look like.

-John Doe
-Job 23423
Customer 12
Customer 23
Customer 46
Customer 87
+Job 53533
+Job 65656
+Bob Smith
+Jane Doe

When you click on a specific item in the tree different forms (in the form of user controls) appear on the right side of my main form. I want to be able to make changes to say Customer Name (John Doe) on the right that update the database and then have the tree re-populated. I am not having any problems here.

What I am having trouble doing is having the tree reload in the exact way it was left. Meaning whatever nodes where expanded will be expanded and whatever nodes were collapsed will be collapsed. Most importantly, I want the node that was selected the first time around to be selected after the tree is re-loaded.

Has anyone have a solution to this?
What if I add a customer? Can I have the tree reload and automatically have it selected?
 
Last edited:
Back
Top