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

RadGridView binded on DataTable - AutoFiltering

1 Answer 91 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Jérôme
Top achievements
Rank 1
Jérôme asked on 20 Oct 2015, 01:07 PM

Hi,

We have a RadGridView binded on DataTable.DefaultView object as ItemsSource.

Our DataTable is define as follow:

A DataRow object is overrided by our own Record object that contains Collection of Property object as ItemArray 

public class Record : DataRow, IEquatable<Record>, ICloneable
    {
        public Record(DataRowBuilder builder)
            : base(builder)
        {
        }
 
        public new Property this[string columnName]
        {
            get
            {
                return (Property)base[columnName];
            }
            set
            {
                SetRowVisibility(value);
                base[columnName] = value;
            }
        }
}

 All Property objects are updated in realtime by a ​thread that changes Property Value

We don't have any problem to see all data updated. 

 

But when we apply a filter on a column, the filter is not reapply automatically  when data value changed.

 

One solution was to remove completely the Row and add it with new values..It 's running for filter, but we have identify several problems with sorting, because Rows are delet​ed/added during sorting thread, that generate an IndexOutOfBoundsException

 

What's the solution ? 

 

regards, 

 

 

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 23 Oct 2015, 12:24 PM
Hello Jérôme,

The RadGridView's filter rely on the CollectionChanged event in order to be applied. If the filter is required to be refreshed automatically when data value has changed, the CollectionChanged event should be raised. Please take a look at the Edit an item outside RadGridView article where you can see the recommended way.

I have already answered the question in the support ticket you opened regarding this issue
and I would like to ask you to continue any further communication there.

Regards,
Martin Vatev
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
Jérôme
Top achievements
Rank 1
Answers by
Martin
Telerik team
Share this question
or