ComboBox with relationship table.

2 posts, 0 answers
  1. Mehmet
    Mehmet avatar
    33 posts
    Member since:
    Jul 2010

    Posted 28 Aug 2011 Link to this post

    Hi Telerik,

    I want to bind the two ComboBox with relationship table.
    but I can't bind second ComboBox.

    I send you Table and source code.

    Could you please send us the correct application.

            <riaControls:DomainDataSource x:Name="TestData" AutoLoad="True" QueryName="GetTest" >
                    <domain:HotelDomainContext />

            <TextBlock Grid.Row="0" Grid.Column="0" Text="Category :"  HorizontalAlignment="Left" Margin="5,2,5,2"/>
            <telerik:RadComboBox x:Name="Category" Grid.Row="1" Grid.Column="0" HorizontalAlignment="Left" VerticalAlignment="Top" MaxHeight="22"  Margin="5,2,5,2"  Width="160"    IsEditable="True" ItemsSource="{Binding Data,Source={StaticResource TestData}}" SelectedValuePath="Deneme" DisplayMemberPath="Name" Text="{Binding Name, Mode=TwoWay}"/>

            <TextBlock Grid.Row="0" Grid.Column="1" Text="Sub Category :"  HorizontalAlignment="Left" Margin="5,2,5,2"/>

            <telerik:RadComboBox x:Name="SubCategory" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Top"     MaxHeight="22"  Margin="5,2,5,2"  Width="160"
     ItemsSource="{Binding ElementName=Category, Path=SelectedValue}"   Text="{Binding Name, Mode=TwoWay}"   IsEditable="True"/>

  2. Ivo
    Ivo avatar
    390 posts

    Posted 01 Sep 2011 Link to this post

    Hi Mehmet,

    I reviewed your code and didn't notice anything wrong. The only thing I suspect may causes the problem is this:
    The SelectedValuePath should point the path to the sub categories of the selected category. You can find an attached working sample project.

    Hope this helps.

    Kind regards,
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  3. DevCraft R3 2016 release webinar banner
Back to Top