Update filter when object content is modified

2 posts, 0 answers
  1. Joost
    Joost avatar
    8 posts
    Member since:
    Feb 2015

    Posted 04 Nov 2015 Link to this post

    Hi,

    I have a rad grid view in my application and I like the power of the column filtering.

    My xaml looks like this:

    <telerik:RadGridView AutoGenerateColumns="False" ItemsSource="{Binding Entries}" IsReadOnly="True" CanUserReorderColumns="False" CanUserDeleteRows="False" CanUserInsertRows="False" RowDetailsVisibilityMode="Visible" SelectionMode="Extended">
        <telerik:RadGridView.Columns>
            <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}" Header="Name" IsReadOnly="True"/>
            <telerik:GridViewDataColumn DataMemberBinding="{Binding Connections}" Header="Connections" IsReadOnly="True"/>
        </telerik:RadGridView.Columns>
    </telerik:RadGridView>

    The gridview binds its itemssource to an observable collection. 

    When someone is filtering on the connections column and one of the items connection property changes, the filtered content is not updated. The updated value does appear in the column however (thanks to INotifyPropertyChanged). I noticed that when the collection changes the filter does work. Is there a way to trigger a filter update as well when a property like connections is updated?

    Kind regards

  2. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    371 posts

    Posted 06 Nov 2015 Link to this post

    Hello Joost,

    Here are the options you have in order to get the GridView updated when a value is changed from the source:
    1. Use the approach demonstrated in this article.
    2. Invoke a GridView.Rebind()
    3. Raise a CollectionChanged event for your source collection.

    I hope this helps.

    Regards,
    Dilyan Traykov
    Telerik
    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. UI for WPF is Visual Studio 2017 Ready
Back to Top