Programatically set ItemsSource to RadDomainDataSource

4 posts, 0 answers
  1. Cheri
    Cheri avatar
    21 posts
    Member since:
    Jan 2012

    Posted 25 Jun 2012 Link to this post


    Hello,

    I am trying to programatically set a RadComboBox ItemsSource to a RadDomainDataSource that is defined in App.xml.  I am relatively new to Silverlight so I am assuming this approach is OK.

    Here's the definition in XAML:

    <telerik:RadComboBox Name="rcbValue" IsEditable="True" Width="150"  HorizontalAlignment="Left"
        telerik:TextSearch.TextPath="Category1"
        SelectedValue="{Binding Value, Mode=TwoWay}"
        SelectedValuePath="Category1"
        ItemsSource="{Binding Source={StaticResource ddsCategories}, Path=DataView}" 
        DisplayMemberPath="Category1" Loaded="cbmValue_Loaded"  >
    </telerik:RadComboBox>


    Basically, all I need to change is ItemsSource, SelectedValuePath and DisplayMemberPath.  I've tried a variety of things but with no luck.  Any help will be appreciated!

    Cheri
  2. Ventzi
    Admin
    Ventzi avatar
    114 posts

    Posted 27 Jun 2012 Link to this post

    Hello Cheri,

    I am not sure that I understand correctly what you mean, but I suggest you to take a look our documentation for RadDomainDataSource and RadComboBox and if you have additional questions, please don't hesitate to contact us. 

    Kind Regadrs,
    Ventzi
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
  4. Cheri
    Cheri avatar
    21 posts
    Member since:
    Jan 2012

    Posted 27 Jun 2012 Link to this post


    Hello Ventzi,

    Basically what I need to do is, in code-behind, change the ItemsSource property of the RadComboBox.  Here's what it is in XAML

        ItemsSource="{Binding Source={StaticResource ddsCategories}, Path=DataView}" 
     
    I need to do this using code when the value of another combobox changes.

    Cheri
  5. Cheri
    Cheri avatar
    21 posts
    Member since:
    Jan 2012

    Posted 27 Jun 2012 Link to this post


    I found a solution that works for me.  See this link:

    http://msdn.microsoft.com/en-us/vs2010trainingcourse_ria_topic4.aspx 

Back to Top