Cascading Combo Boxes with a Static Resource

2 posts, 0 answers
  1. Minh
    Minh avatar
    43 posts
    Member since:
    May 2014

    Posted 09 Feb Link to this post

    `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. 
  2. Stefan X1
    Stefan X1 avatar
    485 posts

    Posted 12 Feb Link to this post

    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
  3. DevCraft R3 2016 release webinar banner
Back to Top