SpreadJS Documentation > Sample Code > Sample Code for Row Filtering > Hiding the Filter Indicator |
You can hide the filter indicator.
This example hides the filter indicator.
JavaScript |
Copy Code
|
---|---|
$(document).ready(function () { var spread = new GcSpread.Sheets.Spread($("#ss").get(0),{sheetCount:3}); var activeSheet = spread.getActiveSheet(); activeSheet.setRowCount(7); activeSheet.setValue(0, 0, "North"); activeSheet.setValue(1, 0, "South"); activeSheet.setValue(2, 0, "East"); activeSheet.setValue(3, 0, "South"); activeSheet.setValue(4, 0, "North"); activeSheet.setValue(5, 0, "North"); activeSheet.setValue(6, 0, "West"); activeSheet.setColumnWidth(0, 80); //Set a row Filter. activeSheet.rowFilter(new GcSpread.Sheets.HideRowFilter(new GcSpread.Sheets.Range(0, 0, 7, 1))); $("#button1").click(function(){ //Hide the filter indicator. var activeSheet = $("#ss").data("spread").getActiveSheet(); var rowFilter = activeSheet.rowFilter(); rowFilter.filterButtonVisible(0, false); activeSheet.repaint(); }); $("#button2").click(function(){ //Display the filter indicator again. var activeSheet = $("#ss").data("spread").getActiveSheet(); var rowFilter = activeSheet.rowFilter(); rowFilter.filterButtonVisible(0, true); activeSheet.repaint(); }); }); |