Save/Load FilterDescriptors?

5 posts, 0 answers
  1. Naresh
    Naresh avatar
    31 posts
    Member since:
    Mar 2009

    Posted 08 Sep 2010 Link to this post

    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
  2. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 09 Sep 2010 Link to this post

    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
  3. DevCraft banner
  4. Naresh
    Naresh avatar
    31 posts
    Member since:
    Mar 2009

    Posted 10 Sep 2010 Link to this post

    Ross,

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

    Thank you,
    Brian
  5. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 13 Sep 2010 Link to this post

    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
  6. Naresh
    Naresh avatar
    31 posts
    Member since:
    Mar 2009

    Posted 13 Sep 2010 Link to this post

    Thank you!
Back to Top
DevCraft banner