Edit this page

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 }
        ]);

        console.log(sheet.range("A1:C4").hasFilter());
    </script>

Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy