行フィルタの状態を取得できます。
次のサンプルコードは、行フィルタの状態を取得します。
JavaScript |
コードのコピー
|
---|---|
$(document).ready(function () { var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"),{sheetCount:3}); var activeSheet = spread.getActiveSheet(); 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); // 行フィルタを設定します。 activeSheet.rowFilter(new GC.Spread.Sheets.Filter.HideRowFilter(new GC.Spread.Sheets.Range(0, 0, 7, 1))); $("#button1").click(function(){ var rowFilter = spread.getActiveSheet().rowFilter(); if(rowFilter.isFiltered(0)){ console.log("Row-filtering executed for Column1"); }else{ console.log("Row-filtering not executed for Column1"); } }); }); |