V9版本spreadjs实现筛选,点击筛选按钮,筛选框弹不出来
筛选测试代码如下:
var sheet = GcSpread.getActiveSheet();
var sels = sheet.getSelections();
if (sels.length == 0) return;
var sel = sels[0];
// set filter
var _drf = new GcSpread.Sheets.HideRowFilter(sel);
sheet.rowFilter(_drf);
var condtionbase = new GcSpread.Sheets.ConditionalBase(GcSpread.Sheets.ConditionType.TextCondition, {
compareType: "EqualsTo",
expected: "",
formula: null
});
_drf.addFilterItem(sheet.getActiveColumnIndex(), condtionbase);
sheet.invalidateLayout();
sheet.repaint();
|