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

3rd level of hierarchy not expanding

3 Answers 46 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
Rob Conley
Top achievements
Rank 1
Rob Conley asked on 21 Jan 2013, 09:11 PM
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"));
  }
}

3 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 22 Jan 2013, 07:40 AM
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.

0
Rob Conley
Top achievements
Rank 1
answered on 22 Jan 2013, 03:09 PM
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.
0
Rob Conley
Top achievements
Rank 1
answered on 09 Feb 2013, 02:13 PM
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).
Tags
TreeListView
Asked by
Rob Conley
Top achievements
Rank 1
Answers by
Maya
Telerik team
Rob Conley
Top achievements
Rank 1
Share this question
or