Another question about Hierarchy

2 posts, 0 answers
  1. Andy Robinson
    Andy Robinson avatar
    2 posts
    Member since:
    Nov 2009

    Posted 23 Sep 2011 Link to this post

    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

                    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.


  2. Petar Mladenov
    Petar Mladenov avatar
    2882 posts

    Posted 28 Sep 2011 Link to this post

    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.

    Petar Mladenov
    the Telerik team

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

  3. DevCraft banner
Back to Top