Spread Windows Forms 10.0 Product Documentation
Creating a Custom Filter

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 the 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:

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options | Documentation Feedback