Is there a Filtered event on the VirtualGrid control?

1 Answer 39 Views
VirtualGrid
Patrick
Top achievements
Rank 1
Patrick asked on 07 Oct 2023, 04:33 PM
I need a way to determine that the user has applied a column filter in the VirtualGrid control so I can update another control in my UI. Is there a way to determine when a filter has been applied or cleared?

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 09 Oct 2023, 06:28 AM

Hello Patrick,

I think the FilterDescriptorsPrepared event of RadVirtualGrid should help for your case. 

Regards,
Martin Ivanov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Patrick
Top achievements
Rank 1
commented on 09 Oct 2023, 11:46 AM

I placed a breakpoint in this event and it does not get raised when I apply or clear a column filter. Is it dependent on another property maybe??
Martin Ivanov
Telerik team
commented on 10 Oct 2023, 10:12 AM

In order to raise the event, you will need first to handle the DistinctValuesLoading event and add items in the e.ItemsSource as shown here.
Also, these events will be raised only if you don't use DataProvider. If the DataProvider is used, you should use its method overrides. In your case, this should be the FilterDescriptorsPrepared virtual method of the provider.
Patrick
Top achievements
Rank 1
commented on 10 Oct 2023, 02:32 PM

I am using a custom DataProvider, so overriding the FilterDecriptorsPrepared virtual method was the answer. Thanks Martin!
Tags
VirtualGrid
Asked by
Patrick
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or