Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't Get TreeView Loaded 2

Status
Not open for further replies.

mdwg2020

Programmer
Feb 17, 2005
51
US
This is probably pretty simple for everyone, but I can't quite understand the process. I have never used a treeview before and am trying to populate one with information that I am pulling from a SQL Server. I pulled the information that I needed into a dataset. In the table, I have information like this:

EmpPK, MgrEmpFK

Each employee has a Primary Key. The same table holds the Primary Key of their manager, that is the obvious relation. It seems like it would be simple to build the hierarchy because it is clearly in the tables, but I don't understand how. Anybody have any ideas?
 
Thank you so much RiverGuy for all of your help. I changed the relationship around, using the child column first and then the parent column and it worked beautifully. It will handle any number of nested levels of employments, and shaves seconds off of the load. I can't think you enough.

Brooks
 
Cool. I wasn't on here in a few days, glad you figure it out though.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top