3rd level of hierarchy not expanding

4 posts, 0 answers
  1. Rob Conley
    Rob Conley avatar
    47 posts
    Member since:
    Sep 2012

    Posted 21 Jan 2013 Link to this post

    I got the second level to expand by raising a property changed on the parent's ObservableCollection. However, after fetching data for the 3rd level, the second level will not expand after adding a "ItemsOnDemand" collection to the second level. Any idea what I might be missing?
    <telerik:RadTreeListView.ChildTableDefinitions>
      <telerik:TreeListViewTableDefinition ItemsSource="{Binding Path=ItemsOnDemand}" />
    </telerik:RadTreeListView.ChildTableDefinitions>

    [Display(AutoGenerateField = false)]
    public ObservableCollection<ISearchDetailFields> ItemsOnDemand
    {
      get
      {
        return this._itemsOnDemand;
      }
      set
      {
        this._itemsOnDemand = value;
        this.OnPropertyChanged(new PropertyChangedEventArgs("ItemsOnDemand"));
      }
    }
  2. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 22 Jan 2013 Link to this post

    Hello Rob,

    I would recommend you to run through this demo for a reference.  

    Greetings,
    Maya
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
  4. Rob Conley
    Rob Conley avatar
    47 posts
    Member since:
    Sep 2012

    Posted 22 Jan 2013 Link to this post

    Yeah, actually that's why I'm a little confused at the moment as what I have is modeled on that example. I am using RIA entities directly, so hopefully I'll find something there soon that is tripping up the third level of the hierarchy.
  5. Rob Conley
    Rob Conley avatar
    47 posts
    Member since:
    Sep 2012

    Posted 09 Feb 2013 Link to this post

    For future readers, here's what I found:

    To get the 2nd level to expand to the 3rd I had to make the first and second levels collections of the same type. Making collections with the same properties names and types was not good enough; the collection item class had to be the very same class. Note that I was loading on demand and not using an EF association hierarchy (or self-referencing hierarchy).
Back to Top