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
565
ComboBoxColumn DataBinding
posted

This may have been answered already but I can't seem to track anything down on it. I have a XamGrid that contains a ComboBoxColumn. I'd like to bind the ComboBoxColumn to a DomainDataSource. I've added the DomainDataSource as a resource but I can't seem to get the binding to work correctly. Here's some of my XAML that hopefully shows what I'm trying to accomplish:

<Grid x:Name ="LayoutRoot">

<Grid.Resources >

 

 

 

 

 

<riaControls:DomainDataSource AutoLoad="True" x:Key="dsDiv" x:Name="dsDiv" QueryName

="GetNewDeptDivisionsSelect">

 

 

 

 

 

<riaControls:DomainDataSource.DomainContext >

 

 

 

 

 

<my:NewDomainContext />

 

 

 

 

 

</riaControls:DomainDataSource.DomainContext >

 

 

 

 

 

<riaControls:DomainDataSource.QueryParameters >

 

 

 

 

 

<riaControls:Parameter ParameterName="DepartmentID" Value ="0" />

 

 

 

 

 

</riaControls:DomainDataSource.QueryParameters >

 

 

 

 

 

</riaControls:DomainDataSource >

 

 

 

 

 

<riaControls:DomainDataSource AutoLoad="True" x:Key="dsSect" x:Name="dsSect" QueryName ="GetNewDeptSectionsSelect">

 

 

 

 

 

<riaControls:DomainDataSource.DomainContext >

 

 

 

 

 

<my:NewDomainContext />

 

 

 

 

 

</riaControls:DomainDataSource.DomainContext >

 

 

 

 

 

<riaControls:DomainDataSource.QueryParameters >

 

 

 

 

 

<riaControls:Parameter ParameterName="DepartmentID" Value="0" />

 

 

 

 

 

</riaControls:DomainDataSource.QueryParameters>

 

 

 

 

 

</riaControls:DomainDataSource>

 

 

 

 

 

</Grid.Resources>

 

 

 

...and in my grid:

<ig:XamGrid x:Name="ItemGrid" DeleteKeyAction="DeleteSelectedRows" AutoGenerateColumns="False" ItemsSource="{Binding Data, ElementName=dsItem}" Width="900" Height="430">

 

 

 

 

<ig:XamGrid.RowSelectorSettings>

 

 

 

 

<ig:RowSelectorSettings Visibility="Visible" EnableRowNumbering="False"/>

 

 

 

 

</ig:XamGrid.RowSelectorSettings >

 

 

 

 

<ig:XamGrid.Columns >

 

 

 

 

<ig:TextColumn Key="ItemID" HeaderText="Item ID" Visibility="Collapsed" />

 

 

 

 

<ig:TextColumn Key="DepartmentID" HeaderText="Department ID" Visibility="Collapsed" />

 

 

 

 

<ig:TextColumn Key="PItem" Width="250" TextWrapping="Wrap" HeaderText="Item" IsFixed="Left" />

 

 

 

 

<ig:ComboBoxColumn Key="DivisionID" Width="200" HorizontalContentAlignment="Stretch" ItemsSource="{Binding Data, Source={StaticResource dsDiv}}" SelectedValuePath="Division" DisplayMemberPath="DivisionID" AllowEditingValidation="False">

 

 

 

 

</ig:ComboBoxColumn >

Parents
  • 138253
    Offline posted

    Hello,

     

    It has been a while since you have made your post, in case you still need support I will be glad to assist you further. I suppose the other community members can benefit from this answer as well. I have been looking into your post, but it seems like am missing something about your scenario, so if this is still an issue for you, could you please send me an isolated sample project, where this is reproduced, so I can investigate it further for you.

     

    Feel free to write me if you have further questions.

Reply Children