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 comparison operator of the filter bar.

Platform: JavaScript |
Control: ejGrid |
Published Date: January 23, 2015 |
Last Revised Date: August 6, 2015

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.

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