Spread Windows Forms 6.0 Product Documentation
Creating a Completely Custom Filter
Support Options
Spread Windows Forms 6.0 Product Documentation > Developer's Guide > Customizing Row or Column Interaction > Managing Filtering of Rows of User Data > Creating a Completely Custom Filter

Glossary Item Box

You can create a custom filter that you can then include in the column filter definition collection. In order to create a custom filter, follow these steps:

  1. Create a class that inherits from FarPoint.Win.Spread.BaseFilterItem or FarPoint.Win.Spread.DefaultFilterItem.
  2. Override DisplayName property to return the name to be displayed in the drop-down list of filter items.
  3. Override the ShowInDropDown method to specify if this filter item should be displayed in the drop-down list given the current filtered in rows.
  4. Override the Filter method to perform the filter action on the specified column.
  5. Override the Serialize and Deserialize methods. Make calls to the base.Serialize and base.Deserialize methods unless your methods handle persisting the default properties.
  6. Create a HideRowFilter or StyleRowFilter object.
  7. Add the custom filter to the custom filter’s list of the column filter definition in the row filtering object from the previous step.

For more details, refer to these members:

Return to the overview at Managing Filtering of Rows of User Data.

© 2002-2012 ComponentOne, a division of GrapeCity. All Rights Reserved.