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 filter the grid string column using customized notcontains operator

Platform: JavaScript |
Control: ejGrid |
Published Date: September 19, 2017 |
Last Revised Date: September 19, 2017
Tags: asp, js, mvc

The Grid has default filter operators for string column like as follows,

  1. ej.FilterOperators.startsWith
  2. ej.FilterOperators.endsWith
  3. ej.FilterOperators.contains
  4. ej.FilterOperators.equal
  5. ej.FilterOperators.notEqual

We can also have filtered the column using customized notcontains” operator externally by clicking the button. Please refer to following code example to achieve this.

JS

MVC

ASP

In the create event we can set the customized filter operator and its definition. After that we can merge the customized operator into default operator like as following

Create event

Here, we can push the new filter objects in filteredColumn arrays and then refresh the grid content by calling the refreshContent API. Because, if we directly filter the customized operator using filter column API then it’s removes the already filteredColumn arrays. Please refer to the following code example to push the new filter objects in filteredColumn arrays,

Button click

 

Output:

Note: Above figure shows the filtered results which Customer ID column doesn’t contains ‘ET’.

ADD COMMENT
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