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?

Platform: WinForms |
Control: GridGroupingControl |
Published Date: May 13, 2015 |
Last Revised Date: July 4, 2017
Tags: filtering


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

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

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

Up arrow icon

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