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

Save/Load FilterDescriptors?

4 Answers 144 Views
DataFilter
This is a migrated thread and some comments may be shown as answers.
Naresh
Top achievements
Rank 1
Naresh asked on 08 Sep 2010, 10:51 PM
Does anyone have a working example of saving the FilterDescriptors collection (say to XML) and then reloading it?

We have a requirement to allow the users to save their filter expressions and then re-use them later.

Any help would be appreciated.

Thanks,
Brian

4 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 09 Sep 2010, 08:15 AM
Hi Brian,

Currently we do not have such an example, but this forum post can help you.

Each FilterDescriptor has only 5 properties:

string Member
FilterOperator Operator
object Value
Type MemberType
bool IsCaseSensitive

So, you can traverse the filter descriptors tree recursively and store these values in XML. For the CompositeFilterDescriptors that you encounter you should store the LogicalOperator property.

Then do the opposite by reading the XML and reconstructing the tree.

I hope this helps.

Sincerely yours,
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
Naresh
Top achievements
Rank 1
answered on 10 Sep 2010, 10:17 PM
Ross,

Could you please resend the Forum Post link? The one embedded in your response does not work.

Thank you,
Brian
0
Vlad
Telerik team
answered on 13 Sep 2010, 07:32 AM
Hello,

 Here is the correct link:
http://www.telerik.com/community/forums/wpf/data-filter/raddatafilter-storage.aspx

Greetings,
Vlad
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
Naresh
Top achievements
Rank 1
answered on 13 Sep 2010, 02:07 PM
Thank you!
Tags
DataFilter
Asked by
Naresh
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Naresh
Top achievements
Rank 1
Vlad
Telerik team
Share this question
or