hasFilter

Returns true if the sheet of the range has filter enabled.

Returns

Boolean true if the sheet has a filter, false otherwise.

Example - clear the filters for a column

    <div id="spreadsheet"></div>


    <script type="text/javascript" charset="utf-8">

        $("#spreadsheet").kendoSpreadsheet();

        var spreadsheet = $("#spreadsheet").data("kendoSpreadsheet");

        var sheet = spreadsheet.activeSheet();

        var values = [
            [ "C 1", "C 2", "C 3" ],
            [ 7, 5, 6 ],
            [ 7, 8, 9 ],
            [ 6, 3, 9 ]
        ];

        sheet.range("A1:C4").values(values);

        var filter = new kendo.spreadsheet.ValueFilter({ values: [ 7 ] });
        var filter2 = new kendo.spreadsheet.ValueFilter({ values: [ 8 ] });

        sheet.range("A1:C4").filter([
          { column: 0, filter: filter },
            { column: 1, filter: filter2 }
        ]);

        /* The result can be observed in the DevTools(F12) console of the browser. */
        console.log(sheet.range("A1:C4").hasFilter());
    </script>

In this article