This is a migrated thread and some comments may be shown as answers.

Programatically set ItemsSource to RadDomainDataSource

3 Answers 49 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Cheri
Top achievements
Rank 1
Cheri asked on 25 Jun 2012, 06:40 PM

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

3 Answers, 1 is accepted

Sort by
0
Ventzi
Telerik team
answered on 27 Jun 2012, 12:55 PM
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 >>

0
Cheri
Top achievements
Rank 1
answered on 27 Jun 2012, 01:07 PM

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
0
Cheri
Top achievements
Rank 1
answered on 27 Jun 2012, 03:11 PM

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

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

Tags
ComboBox
Asked by
Cheri
Top achievements
Rank 1
Answers by
Ventzi
Telerik team
Cheri
Top achievements
Rank 1
Share this question
or