We are using kendo spreadsheet with more than one sheets, wants the functionality to clear applied filters in the spreadsheet. I couldn't find any documentations for that, please helps us to fix this issue. Thanks
1 Answer, 1 is accepted
0
Dimitar
Telerik team
answered on 07 Jun 2019, 07:39 AM
Hello Michael,
If I can understand correctly, you have a filter set on a column that you would like to programmatically clear. If this is the case, then you could use the Spreadsheet Sheet's clearFilter() method:
<div id="spreadsheet"></div>
<script type="text/javascript" charset="utf-8">
$("#spreadsheet").kendoSpreadsheet();
var spreadsheet = $("#spreadsheet").data("kendoSpreadsheet");
var sheet = spreadsheet.activeSheet();
sheet.range("A1:B2").values([
[1, 2],
[2, 3]
]).filter({
column: 1,
filter: new kendo.spreadsheet.ValueFilter({
values: [2]
})
}); // the filter will hide the second row
sheet.clearFilter(1); // the clear filter will remove the applied filter for the second column.
</script>
Regards,
Dimitar
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers.Learn More.