Skip to content

This sample illustrates how to create and register custom functions (Filter Control, Filter Editor).

License

Notifications You must be signed in to change notification settings

DevExpress-Examples/how-to-create-and-register-custom-filter-editor-functions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WinForms Filter Editor - Create and register custom functions

This example creates three custom functions:

  • NotBeginsWith - a function opposite to the standard BeginsWith function.
  • IsDaysInterval - checks whether a record belongs to the “(Today - N days) ~ (Today + N days)” timeframe.
  • IsWeekend - shows only Saturday and Sunday records.

WinForms Filter Editor - Create and register custom functions

The example demonstrates three methods (techniques) for registering custom functions (depending on the registration type you are using, feature availability may vary):

  • Handle the control's QueryCustomFunctions event - custom functions added on this event are available for this specific UI control only.
  • Handle the CriteriaOperator.QueryCustomFunctions event to register global custom functions available for all Filter/FilterEditor controls in the application.
  • Use the DevExpress.Data.Filtering.CustomFunction attribute in a data source class - a custom function registered by this attribute is available for all Filter/FilterEditor controls that are bound to this data source.

Documentation

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)