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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to change the default compare operator?


The GridGroupingControl contains different types of compare operators for DynamicFilter like, "StartsWith", "EndsWith", "Equals", "NotEquals", "LessThan", "LessThanOrEqualTo", "GreaterThan", "GreaterThanOrEqualTo", "Like". The default compare operator is StartsWith. To change these compare operators, use the following customization.


You can change the compare operators by customizing the FilterBarCell model and renderer. GridTableFilterBarExtCellModel/GridTableFilterBarExtCellRenderer class that is derived from GridComboBoxCellModel/GridComboBoxCellRenderer class are customized for modifying the compare operator’s ListBox. The images of compare operators are drawn by using PaintIcon method.

GridGroupingExtBitmaps class is used to retrieve the exact Bitmap from the application path.



The following code example is used to return the compare operator name for applying the filter option.



The following code example illustrates to apply the filter format based on the compare operator name.





The following screenshot displays the customized compare operators.

F:\Winforms\KB\DataGrid\WF-19776 customize the default compare opertator\IMG_11052015_193007.png

Figure 1: Customized compare operators

Sample Links

C#: CompareOperator_CS

VB: CompareOperator_VB

Article ID: Published Date: Last Revised Date: Platform: Control:
4856 05/13/2015 07/04/2017 WinForms GridGroupingControl
Did you find this information helpful?
Add Comment
You must log in to leave a comment

Please sign in to access our KB

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon 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.Close Icon