表头有两行,这两行被合并成一行了,我使用以下的方法添加过滤,过滤按钮不显示,也没有报错,我试着把合并去掉,过滤按钮出现了。请问,合并后的表头不能按此方法添加过滤吗?
sheet.AutoFilterMode = FarPoint.Web.Spread.AutoFilterMode.Enhanced;
FarPoint.Web.Spread.IRowFilter rowFilter = new FarPoint.Web.Spread.HideRowFilter(sheet);
FarPoint.Web.Spread.FilterColumnDefinition fd1 = new FarPoint.Web.Spread.FilterColumnDefinition(1, FarPoint.Web.Spread.FilterListBehavior.Default);
FarPoint.Web.Spread.FilterColumnDefinition fd2 = new FarPoint.Web.Spread.FilterColumnDefinition(2, FarPoint.Web.Spread.FilterListBehavior.Default);
FarPoint.Web.Spread.FilterColumnDefinition fd3 = new FarPoint.Web.Spread.FilterColumnDefinition(3, FarPoint.Web.Spread.FilterListBehavior.Default);
FarPoint.Web.Spread.FilterColumnDefinition fd4 = new FarPoint.Web.Spread.FilterColumnDefinition(4, FarPoint.Web.Spread.FilterListBehavior.Default);
rowFilter.ColumnDefinitions.Add(fd1);
rowFilter.ColumnDefinitions.Add(fd2);
rowFilter.ColumnDefinitions.Add(fd3);
rowFilter.ColumnDefinitions.Add(fd4);
sheet.RowFilter = rowFilter;
|