Filter change issue


Hello Team,
I make filter basis on column. i just want filter when we select column name and search by name.
but only one filter is working when refresh the page then we able to filter in other column.
check blew GUI and script.


    $("#icoSectionSearch").click(function (args) {

        var ColumnName, value, obj;
        obj = $("#Gantt").ejGantt("instance");

        ColumnName = $("#selectedSearchFilter").text().trim();
        value = $("#txtSectionSearch").val().trim();
        obj.clearFilter();

        obj.filterColumn(ColumnName, "contains", value);

    });


i want to mange clear filter in same function. how is possible ?



1 Reply

LG Logeswari Gopalakrishnan Syncfusion Team May 26, 2020 12:50 PM UTC

Hi Projectier, 
 
From your attached screen shot it is EJ1 Gantt. So we provide solution in EJ1 version of Gantt. We have analyzed your query and we can filter other columns without doing page refresh and used clearFilter method in same function. please find the below code snippet. 
 
<script> 
        function onClick(args) { 
            var ganttObj = $("#GanttEditing").data("ejGantt"); 
            if (ganttObj != undefined) { 
                if (this.element.attr("id") == "doFiltering") { 
                    var name = $("#columnsList").data("ejDropDownList"); 
                    var columnName = name.getSelectedValue(); 
                    var value = $("#textbox").val(); 
                    ganttObj.clearFilter(); 
                    ganttObj.filterColumn(columnName, "contains", value); 
                } 
            } 
        } 
    </script> 
 
  
We have also prepared sample for your reference . Please find the below sample link. 
 
 
Please let us know if you need further details on this. 
 
Regards, 
Logeswari G 


Loader.
Up arrow icon