Hey gang -
I'm building a new page that needs to allow the user to select a person in the corporate hierarchy, then see that person's direct reports, with some columnar data. So I'm using the RadTreeList control because it appears to be the right tool for the job.
However, I'm struggling with getting beyond the simplest initial implementation (one guy and his immediate direct reports). I've looked around on the forum for answers, but can't find anything that will get me over the hump (probably asking my questions incorrectly). Hopefully, I can glean what I need by asking for help all at once. Thanks in advance for help on...
Here are the problems I'm running in to, mostly around getting a specific value (samAccountName) for a selected item and databinding on demand.
I know I'm asking numerous questions all at once. I'm hoping the answers are very straightforward. I have to get this thing ready for a demo within the next week.
Again - thanks very much for all the help you can provide in solving this set of dilemmas.
A
I'm building a new page that needs to allow the user to select a person in the corporate hierarchy, then see that person's direct reports, with some columnar data. So I'm using the RadTreeList control because it appears to be the right tool for the job.
However, I'm struggling with getting beyond the simplest initial implementation (one guy and his immediate direct reports). I've looked around on the forum for answers, but can't find anything that will get me over the hump (probably asking my questions incorrectly). Hopefully, I can glean what I need by asking for help all at once. Thanks in advance for help on...
Here are the problems I'm running in to, mostly around getting a specific value (samAccountName) for a selected item and databinding on demand.
- The corporate hierarchy is quite large, so I'm only wanting to load the direct reports when a person clicks on a person within the hierarchy. Otherwise, the CEO and several upper managers will get timeouts when they load the page (because of the large hierarchy). I know the system can handle on-demand loading of child elements, though I cannot figure out how to do it.
I'm building the initial collection of objects via a WCF service when the user first enters the page, based on their AD Sam Account Name. The collection includes an (int) ID and (int) ParentID - as I understand this is the only way to properly indicate the hierarchical relationships. This is a short list as a rule, and it works for the first load of the page (I'm using the NeedDataSource event handler for all this so far).
I see the individual and their immediate direct reports (but these reports don't have an expander (+/-) button because I haven't loaded their direct reports - I want to do that on selection).
I have a method that can check if a person has direct reports, so I can call that for each person in the direct reports list, but how do I show the expander button if they have reports without loading any data yet? I don't want to load that person's direct reports until they have been selected.
- Which leads me to the second problem: How do I append a selected person's direct reports to the current treelist's collection on selection? I know I can get the list of items, convert to a collection, append the new direct reports items, and rebind... but...
- How do I get the selected person's Sam Account Name (which is bound to the item, so I know it's available)?
- Which event should fire to reconstitute the collection and rebind?
- If I can get the info to do all of that on the correct event handler, then the only other thing I need to know is how can I make a column value (i.e. the person's full name) be the actual selectable button instead of the expander icon? This would be preferable.
- Is the RadTreeView the right control for this job???
I know I'm asking numerous questions all at once. I'm hoping the answers are very straightforward. I have to get this thing ready for a demo within the next week.
Again - thanks very much for all the help you can provide in solving this set of dilemmas.
A