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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Essential JS2

Syncfusion jQuery based widgets are no longer in active development. Switch to our pure JavaScript based next generation Essential JS 2 library.

Syncfusion Feedback

How to change the default comparison operator of the filter bar.

Platform: jQuery |
Control: ejGrid

In our current implementation of the grid filter bar’s default operator for string column is “startswith” and for the numeric column is “equal”.

We can change the default operator of the filter bar to other operators like contains, lessthan and etc. using actionBegin client side event of the grid as follows.








Changing the operator:



                                                        Figure: Filterbar with contains operator

You must log in to leave a comment
Dec 23, 2016
use args.currentFilteringColumn if you want to change the default for only a particular column instead of changing the defalut for all coulumns with the default operator of "startsWIth"    

function actionBegin(args) {
        if (args.requestType == "filtering" && args.currentFilteringColumn == "Customer")
            args.currentFilterObject[0].operator = "equal";

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

Live Chat Icon For mobile