I need some help with populating a treeview from a sql database, simple right, just look at the thousands of examples and adapt. Problem is I have tried for about a week to use many many different samples and I am still nowhere. I am not a programmer so its tough to understand some of the basics everyone takes for granted. I have developed an asp.net web app that keeps track of projects and their deadlines for management to scrutenise, the application is complete and working but now want to move to Silverlight and got a request from an exco member to have the entire structure displayed as a treeview (sure, no problem, easy as pie)
Here is the scenario:
All Departments
Coffee Exco
Project 1
Action 1
Action 2
Project 2
Action 1
Credit Analytics
Project 3
Action 1
Currently I have 2 Tables that store the data needed for the treeview. I can get the data no problem, its trying to get it into a hierarchical treeview that I cannot seem to get right.
Sample data in database:
Tab1ID|Department|Project|Deadline|Owner|Completed
1 Coffee Exco Project 3/31/2013Public 0
2 Credit AnalyticsProject 4/20/2013Public 0
3 Coffee Exco Project 5/1/2013Public 0
Tab2ID|Project|Action|ActionDeadline|Progress
1Project 1 Action 1 10
2Project 1 Action 2 0
3Project 2 Action 1 0
Like I said, I have tried so many different samples I now have no idea what to do, if someone could walk an old dog through the process step by step and assume he is not the brightest I would be eternally grateful. I don't mind doing it either through XAML or code-behind. I would appreciate an end to end example if at all possible.
Kind regards, Jacques