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

Update filter when object content is modified

1 Answer 320 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Joost
Top achievements
Rank 1
Joost asked on 04 Nov 2015, 12:49 PM

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

1 Answer, 1 is accepted

Sort by
0
Dilyan Traykov
Telerik team
answered on 06 Nov 2015, 02:06 PM
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
Tags
GridView
Asked by
Joost
Top achievements
Rank 1
Answers by
Dilyan Traykov
Telerik team
Share this question
or