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

Cascading Combo Boxes with a Static Resource

1 Answer 42 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Minh asked on 09 Feb 2016, 04:02 PM
`TelerikControls` has a bug and sometimes the `GridView` displays  empty `ComboBoxCells`. In order to fix this I followed their steps here and I have to point the `ItemsSource` to a static resource. 

That method works perfectly if the resource never changes, but mine can change depending on a `ComboBoxSelection` within the `DataGrid`. I'm wondering how do I update my `StaticResource` collection in the UI.

I've tried this method but it never changed the collection in the UI. 


private void OnSelectionChanged(object sender, SelectionChangedEventArgs e)
    var radcomboBox = e.OriginalSource as RadComboBox;
    if (radcomboBox != null)
        RadComboBox comboBox = (RadComboBox)e.OriginalSource;
        (FindResource("MyChannelDataProvider") as ObjectDataProvider).Refresh();


<ObjectDataProvider x:Key="MyChannelDataProvider" ObjectType="{x:Type Loans:LoanViewModel}">
<Telerik:GridViewComboBoxColumn Header="Relationship"
                                ItemsSource="{Binding SelectedRelationship.GridRelationshipTypes, Source={StaticResource MyChannelDataProvider}}" 
                                DataMemberBinding="{Binding RelationshipType}"

I've set break points for `GridRelationshipTypes` and I can see it is getting the correct collection. If I remove static resource, the code works perfectly but it may still exhibit the telerik bug. 

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 12 Feb 2016, 11:50 AM
Hello Minh,

I already replied you in the other forum thread you opened regarding this requirement. In order to avoid double posting, I would kindly ask you to continue any further communication regarding this topic in it.

All the best,
Stefan X1
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question