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.

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

Article ID: Published Date: Last Revised Date: Platform: Control:
3369 01/23/2015 08/06/2015 JavaScript ejGrid
Did you find this information helpful?
Diamond 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";
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