您好,
可以使用自定义筛选设置默认筛选的值。
示例代码(筛选效果如图2):
- var range = new GC.Spread.Sheets.Range(3, 1, 4, 1);
- var rowFilter = new GC.Spread.Sheets.Filter.HideRowFilter(range);
- sheet.rowFilter(rowFilter);
- //rowFilter.filterButtonVisible(false);
- var condition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.cellValueCondition, {compareType: GC.Spread.Sheets.ConditionalFormatting.TextCompareType.equalsTo, expected: 4});
- rowFilter.addFilterItem(1, condition);
- rowFilter.filter(1);
复制代码
关于自定义筛选更多知识请参考学习指南:
https://demo.grapecity.com.cn/sp ... ustom-filter/purejs
|