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

removing filter options that are not required

Thread ID:





126437 Oct 14,2016 04:38 PM UTC Oct 17,2016 10:55 AM UTC JavaScript 1
Tags: ejGrid
Makoto Ohki
Asked On October 14, 2016 04:38 PM UTC

Is it possible to remove filter options that are not required?
For example, in one column, only the 2 filters below are needed.

Mani Sankar Durai [Syncfusion]
Replied On October 17, 2016 10:55 AM UTC

Hi Makoto, 

Thanks for contacting Syncfusion support. 

We have analyzed your query and we have achieved your requirement by using create event in grid. 

Please refer the below code example. 
   $(function () { 
                columns: [ 
                create: function (args) { 
                    var grid = $("#Grid").ejGrid("instance"); 
                    this.element.on("mousedown", ".e-gridheader .e-filtericon", function (argument) { 
                        var target = argument.target; 
                            //open event of the filter menu dialog 
                            open: function (e) { 
                                if ($(target).parent().find(".e-headercelldiv").attr("ej-mappingname") == "CustomerID") 
                                    $("#" + grid._id + "string_ddinput_popup_wrapper").find("li[value='Equal']").hide(); 
                                    $("#" + grid._id + "string_ddinput_popup_wrapper").find("li[value='Equal']").show(); 

In the above code example, we have hidden the Equal Operator in the filter menu for the CustomerID column when the dialog gets open. 

We have also prepared a sample that can be available from the below link, 

Also refer the documentation link for create event in grid. 

Please let us know if you need further assistance. 

Manisankar Durai. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

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