We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

How to save and load filterbar values for all columns?

In the GridGroupingControl, it is not possible to Serialize or Deserialize the filtering operations, by default. But, this can be achieved manually by manipulating it with the collections. The previously performed filter in the Grid can be stored and retrieved by using the RecordFilters property. In this case, the previously performed filter can be stored by maintaining the collection for column names and the FilterCondition of the columns that are filtered (by using the Save button click). Then by using those column names and filter conditions, the filter can be reassigned or loaded by assigning this to the Record Filters.

C#

VB

 

In the following image, the item France in the Country column is filtered and the filtered values are saved by using the Save Filter button. Once the modification is saved, you can clear the filtering of the Country column. After that, load the saved filter state through the Load Filter button. Then the previously saved filter changes are retained.

 

Figure 1: France in Country column is filtered

Sample Links:

C#: SaveAndLoad_c#

VB: SaveAndLoad_VB

Article ID: Published Date: Last Revised Date: Platform: Control:
4671 04/22/2015 04/22/2015 Windows Forms GridGroupingControl
Tags:
Did you find this information helpful?
Add Comment
You must log in to leave a comment

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.