I have a grid with note types and note subtypes where the ID's for the note subtypes are not unique across all note types, just for the note type they are related to. Each NoteTpye object has a NoteSubTypes collection property.
Basically they work like below [id]-[value]
1-NoteType1
1-NoteSubType11
2-NoteSubType12
2-NoteType1
1-NoteSubType21
2-NoteSubType22
Because of this when I need to bind the items source of the NoteSubType column to NoteType columns selected NoteType.NoteSubTypes property. Here's what I have so far:
I just need to get the NoteSubType ItemSource. I have a IValueConverter and IMultiConverter already created for this if we need them (from experimentations with other grids).
Basically they work like below [id]-[value]
1-NoteType1
1-NoteSubType11
2-NoteSubType12
2-NoteType1
1-NoteSubType21
2-NoteSubType22
Because of this when I need to bind the items source of the NoteSubType column to NoteType columns selected NoteType.NoteSubTypes property. Here's what I have so far:
<telerik:RadGridView ItemsSource="{Binding Path=NotesList}" AutoGenerateColumns="False"> <telerik:RadGridView.Columns> <telerik:GridViewDataColumn Header="ID" DataMemberBinding="{Binding Path=ID}" /> <telerik:GridViewComboBoxColumn Header="NoteType" UniqueName="NoteType" ItemsSource="{Binding Path=NoteTypeList}" DataMemberBinding="{Binding Path=NoteTypeID}" SelectedValueMemberPath="ID" DisplayMemberPath="Name"> </telerik:GridViewComboBoxColumn> <telerik:GridViewComboBoxColumn Header="NoteSubType" ItemsSource="{???}" DataMemberBinding="{Binding Path=NoteSubTypeID}" SelectedValueMemberPath="ID" DisplayMemberPath="Name"> </telerik:GridViewComboBoxColumn> </telerik:RadGridView.Columns> </telerik:RadGridView>
I just need to get the NoteSubType ItemSource. I have a IValueConverter and IMultiConverter already created for this if we need them (from experimentations with other grids).