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

Save/LoadSettings method for RadFilter

1 Answer 156 Views
Filter
This is a migrated thread and some comments may be shown as answers.
George
Top achievements
Rank 1
George asked on 16 Aug 2010, 06:25 PM

Hi guys,

These methods work great except for one circumstance...

Since there is no default "revert" functionality in RadFilter, I have to do my own.  I do this using the SaveSettings and LoadSettings methods, and work great, except if the the filter is blank to begin with.

  • Start with a blank filter
  • savedFilter = RadFilter.SaveSettings()
  • Add groups and expressions
  • RadFilter.LoadSettings(savedFilter)

It will not revert back to a blank filter.  You can replicate this on your demo here.

I admit its minor, and the "x" at the top level will clear them, but it interferes with the consistency of my "revert" function.

Thanks, Greg

1 Answer, 1 is accepted

Sort by
0
George
Top achievements
Rank 1
answered on 16 Aug 2010, 07:00 PM
It appears I've answered my own question, and taking a copy of the demo I listed in my previous post, it also fixes that demo...

Simply clear the RootGroup Expressions before applying LoadSettings()...

RadFilter.RootGroup.Expressions.Clear();
RadFilter.LoadSettings(savedFilter);

Thanks, Greg
Tags
Filter
Asked by
George
Top achievements
Rank 1
Answers by
George
Top achievements
Rank 1
Share this question
or