I am using TreeListView to show my data in hierarchical order. Here is simplified view of my xaml.
So far everything works fine. Data is being shown properly. Only the issue is when data is shown my tree has data in following format.
- section 1
- item 1 in section 1
- item 2 in section 1
and so on items .....................
- section 2
- item 1 in section 2
- item 2 in section 2
and so on items .....................
and so on sections........................
These section are created programmatically. Once my data is loaded, I want to expand all sections except a particular one. The methods that can be called on TreeListView after data load are ExpandAllHierarchyItems() OR CollapseAllHierarchyItems(). But this is not what I need. How can I set a particular section to be collapsed in this case?
I saw a method CollapseHierarchyItem() but I could not find the way to access that particular HierarchyItem and call this method on it. Could you please help out me with this issue?
<
RadTreeListView
>
<
RadTreeListView.ChildTableDefinitions
>
<
TreeListViewTableDefinition
ItemsSource
=
"{Binding PropertiesList, Mode=OneWay}"
/>
</
RadTreeListView.ChildTableDefinitions
>
<
RadTreeListView.Columns
>
<
GridViewColumn
>
<
GridViewColumn.CellTemplate
>
<!-- My control to be shown in read only mode -->
</
GridViewColumn.CellTemplate
>
<
GridViewColumn.CellEditTemplate
>
<!-- My control to be shown in Edit mode -->
</
GridViewColumn.CellEditTemplate
>
</
GridViewColumn
>
</
RadTreeListView.Columns
>
</
RadTreeListView
>
So far everything works fine. Data is being shown properly. Only the issue is when data is shown my tree has data in following format.
- section 1
- item 1 in section 1
- item 2 in section 1
and so on items .....................
- section 2
- item 1 in section 2
- item 2 in section 2
and so on items .....................
and so on sections........................
These section are created programmatically. Once my data is loaded, I want to expand all sections except a particular one. The methods that can be called on TreeListView after data load are ExpandAllHierarchyItems() OR CollapseAllHierarchyItems(). But this is not what I need. How can I set a particular section to be collapsed in this case?
I saw a method CollapseHierarchyItem() but I could not find the way to access that particular HierarchyItem and call this method on it. Could you please help out me with this issue?