How may I persist Column FilterDescriptors for the Virtual Grid?

1 Answer 22 Views
VirtualGrid
Joe
Top achievements
Rank 2
Iron
Iron
Veteran
Joe asked on 10 Nov 2023, 05:57 PM
I am using filtering with a custom DataProvider for my Virtual Grid.   Users use the popup dialog to set filter conditions.  It works well. 

I understand how to retrieve the filter descriptors from one grid and to apply them to another.  But how may I persist them?

I want to save to a text file a set of filters from VirtualGrid A.   Then, later on, I wan to  set VirtualGrid B columns to to use those same filters purely from that persisted text? 


I can see that ColumnFilterDescriptor.ToString() will give me what looks like a full  persistable filter expression.  At least it looks like a meaningful expression.  But I canntot see a method to go the other way

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 14 Nov 2023, 09:52 AM

Hi Joe,

I am afraid that we do not have an automatic way of restoring this string. I have logged a feature request for this on your behalf. You can track its progress, subscribe to status changes, and add your comment to it here: VirtualGrid/GridView: Add a way to save the Filter/Sort/Group descriptors to a string or a file. I have updated your Telerik points for this report. 

As an alternative, you can use the PersisastanceFramework to store this: WPF PersistenceFramework - Save in a Stream. 

Another approach is storing descriptor properties in a separate object that can be easily serialized. I have implemented a small sample project that shows this. It is not meant as a complete solution and may need additional implementation and testing. 

Should you have any other questions do not hesitate to ask.

Regards,
Dimitar
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.

Joe
Top achievements
Rank 2
Iron
Iron
Veteran
commented on 14 Nov 2023, 06:44 PM

Thank you, Dimitar.  I appreciate the sample application.   I will take a look at it and see if I can implement the approach in mine.
Dimitar
Telerik team
commented on 15 Nov 2023, 09:10 AM

Hi Joe, 

Ok, do not hesitate to contact us if you have other questions.

Tags
VirtualGrid
Asked by
Joe
Top achievements
Rank 2
Iron
Iron
Veteran
Answers by
Dimitar
Telerik team
Share this question
or