This is a migrated thread and some comments may be shown as answers.

Another question about Hierarchy

1 Answer 50 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Andy Robinson
Top achievements
Rank 1
Andy Robinson asked on 23 Sep 2011, 08:24 PM
New to the WCF/RIA/DomainServices/Silverlight world so please forgive is this has been answered and I didn't recognize the solution.

I have a dataset that looks like this

State        County                    City
NC            Wake                        Cary
NC            Wake                        Raleigh
NC            Orange                      Durham
NC            Orange                      Chapel Hill
SC            SomeCounty              Columbia
SC            SomeOtherCounty     Anderson

I need to place this into a TreeView that gives me something like this

NC
        Wake
                Cary
                Raleigh
        Orange    
                Durham
                Chapel Hill
............ etc.

So my first goal is to just get the tree view to populate like the example above.  After I get that I'll need to respond to the click at the Sate, County, and City levels differently.  I think there are probably enough good examples like that.  What's throwing me off is that I am creating Entity Data models but the construction of this dataset is actually very complex behind the scenes so it comes from a stored procedure.  Coming from a stored procedure it appears I lose alot of the neat inheritance features I get with using standard tables and views with EDM.

Any help would be appreciated.  Also, a hey dummy look at this example we've posted 10 times before would not be taken with any offense.

Regards,
Andy


1 Answer, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 28 Sep 2011, 04:36 PM
Hi Andy Robinson,

 Your scenario is typically handled by the LoadOnDemand feature of the RadTreeView. Your tree could first be populated by the distinct States, then when you expand a State , you load the corresponding child countries and etc. You can examine this help article showing how to bind a RadTreeView via Ria Services and use the Load OnDemand feature. On the other hand, could you please point us to the example you mentioned. I cannot find any other tickets from you. Please let me know if I am missing something. Thank you in advance.

Regards,
Petar Mladenov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
TreeView
Asked by
Andy Robinson
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Share this question
or