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

No Filtered Event

4 Answers 55 Views
GridView
This is a migrated thread and some comments may be shown as answers.
sun
Top achievements
Rank 1
sun asked on 17 Oct 2009, 04:15 AM
I use GridViewFilterRow.cs to filter rows. But I can not catch filtered event or filtering event!
 Thanks

4 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 19 Oct 2009, 09:42 AM
Hi sun,

Could you please elaborate a little bit more and send us a small sample project with your code. Thanks in advance.

Sincerely yours,
Ross
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Francisco Amador
Top achievements
Rank 1
answered on 27 Apr 2010, 05:48 PM
I think what he meant was that when you modify the RadGridView.FilterDescriptors directly the Filtered event for the GridView is not fired. I have just encountered that bug now with Telerik controls version 2010.1.412.1030

In my case, the following code would not fire the Filtered event. (Assume that filters were added to the compositeDescriptor or that it's empty)
CompositeFilterDescriptor compositeDescriptor = new CompositeFilterDescriptor(); 
if (gv.FilterDescriptors.Count == 1) 
    gv.FilterDescriptors[0] = compositeDescriptor; 
else 
    gv.FilterDescriptors.Add(compositeDescriptor); 

It's not a big deal for me since I don't actually have to have that event, but I can see where it could be useful to fire that event even if the filters are modified programmatically.

-Francisco
0
Rossen Hristov
Telerik team
answered on 28 Apr 2010, 08:34 AM
Hi Francisco Amador,

That is not a bug. This is by design. The events are raised only when the end-user is using the UI to filter so you as a developer can respond to this. You have no other way of knowing that the user is clicking the filtering UI.

In case you are touching the filters programmatically, you are the one that is causing the filtering and thus you know what you are doing and you can take the respective action if needed. You do not need events in this case. I hope this makes sense.

Kind regards,
Ross
the Telerik team

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 Public Issue Tracking system and vote to affect the priority of the items.
0
Francisco Amador
Top achievements
Rank 1
answered on 28 Apr 2010, 01:59 PM
Yes it does. Like I said, I didn't really need it since I was making my own calls, but I just wanted to bring it up just in case.

Thank you for your clarification,
-Francisco
Tags
GridView
Asked by
sun
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Francisco Amador
Top achievements
Rank 1
Share this question
or