I need to understand the best way to accomplish this.
I have an ItemType list. For each ItemType, I specify the type of TreeNode that can be defined. So, then I have an Item list. Each Item is assigned an ItemType and has a Children property which are more Item objects thus making the Hierarchy.
Question is, how do I filter the items in the Item Type Column's ComboBox in relation to the selected Hierarchy Node?
For pseudo code, do I:
- Load the master Item Type list
- Load the Hierarchy
- Recursively Traverse the Hierarchy attaching the related Item Types to each node
- Then, Bind?
Thanks for your help,
Joel
TreeListView Definition:
<
telerik:RadTreeListView
x:Name
=
"treeListView"
AutoGenerateColumns
=
"False"
HorizontalAlignment
=
"Stretch"
VerticalAlignment
=
"Stretch"
CanUserFreezeColumns
=
"False"
CanUserReorderColumns
=
"False"
Grid.Row
=
"1"
Margin
=
"5"
IsReadOnly
=
"{Binding Context.IsReadOnly}"
ItemsSource
=
"{Binding Context.Hierarchy, Mode=TwoWay}"
SelectedItem
=
"{Binding Context.SelectedItem, Mode=TwoWay}"
AutoExpandItems
=
"True"
>
<
telerik:RadTreeListView.ChildTableDefinitions
>
<
telerik:TreeListViewTableDefinition
ItemsSource
=
"{Binding Children}"
/>
</
telerik:RadTreeListView.ChildTableDefinitions
>
<
telerik:RadTreeListView.Columns
>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding Name, Mode=TwoWay}"
CellTemplate
=
"{StaticResource FirstColumnCellTemplate}"
IsReadOnly
=
"False"
Width
=
"*"
/>
<
telerik:GridViewComboBoxColumn
x:Name
=
"itemTypeColumn"
Header
=
"Item Type"
SelectedValueMemberPath
=
"Name"
DisplayMemberPath
=
"Name"
ItemsSource
=
"{Binding Context.ItemTypes}"
DataMemberBinding
=
"{Binding ItemTypeName, Mode=TwoWay}"
Width
=
"150"
/>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding IsActive, Mode=TwoWay}"
Header
=
"Include"
/>
</
telerik:RadTreeListView.Columns
>
</
telerik:RadTreeListView
>