Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
350
xamGrid MultiColumComboColumn Binding
posted

Hi,

I'm having problems binding xamGrid with a MultiColumnComboColumn to an ObservableCollections(of Class) in my window. This is what I got:

1) An object "FSP" which is an ObservableCollection(of clsFSP), where clsFSP has the members "ID", "AR", "pf_id_01", ...
2) An Object "FL" which is an ObservableCollection(of clsF), where clsF has the members "ID", "Name", "Data", ...

I added xamGrid to my window:

<ig:XamGrid Name="xg" AutoGenerateColumns="False" ItemsSource="{Binding Path=FSP, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}">
      <ig:XamGrid.Columns>
          <ig:TextColumn Key="ID"/>
          <ig:TextColumn Key="AR" />
          <ig:TextColumn key="pf_id_01" />
      </ig:XamGrid.Columns>
</ig:XamGrid>

This works just fine, all items are displayed. Now I want to have a combolist to look up "pf_id_01" in "FL" where the member ID in clsF corresponds with "pf_id_01". So I tried

<ig:XamGrid Name="xg" AutoGenerateColumns="False" ItemsSource="{Binding Path=FSP, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}">
      <ig:XamGrid.Columns>
          <ig:TextColumn Key="ID"/>
          <ig:TextColumn Key="AR" />
          <ig:MultiColumnComboColumn Key="pf_id_01"  
                                     ItemsSource="{Binding Path=FL, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}"
                                     AutoGenerateColumns="False"
                                     DisplayMemberPath="Name"
                                     SelectedValuePath="ID">

              <ig:MultiColumnComboColumn.Columns>
                  <ig:TextComboColumn Key="Name"/>
                  <ig:TextComboColumn Key="Data"/>
              </ig:MultiColumnComboColumn.Columns>
          </ig:MultiColumnComboColumn>
      </ig:XamGrid.Columns>
 </ig:XamGrid>

This time there are displayed no items at all, xamGrid is empty. Any hint on how to solve this problem?

Thanks

Stephan