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

Reapply filters programmatically

1 Answer 101 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Igor Mariash
Top achievements
Rank 1
Igor Mariash asked on 10 Feb 2012, 04:10 PM
wonder if you can help with the simpler way to reapply filters programmatically.  I have found so far only 1 solution:

IFilterDescriptor[] filterDescriptors = new IFilterDescriptor[_gridView.FilterDescriptors.Count];
_gridView.FilterDescriptors.CopyTo(filterDescriptors, 0);
_gridView.FilterDescriptors.Clear();
_gridView.FilterDescriptors.AddRange(filterDescriptors);


is there more elegant method?

Cheers, Igor

1 Answer, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 10 Feb 2012, 05:23 PM
Hi,

In the current version, this approach should work. This is the correct method.

However, for the Q1 2012 version we will make breaking changes to the filtering API (it will be described in the Release Notes in great detail) and this approach will no longer work.

I have prepared a sample project that demonstrates how this will be done once we release the new version of Q1 2012. It uses unofficial binaries that are not release yet. 

We hope to release Q1 next Wednesday.

Please, find it attached and let me know if you have any questions. 

Kind regards,
Ross
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
GridView
Asked by
Igor Mariash
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Share this question
or