防止spread控件双击表头进行分组

分组常用代码如下:

//设置 group 信息
FarPoint.Web.Spread.SheetView sv = this.FpSpread1.ActiveSheetView;
//设置表头双击是否可以分组
//sv.AllowGroup = true;
gdm = new GroupDataModel(sv.DataModel);
Session["dataModel"] = gdm;
sv.DataModel = gdm;
FarPoint.Web.Spread.SortInfo[] sort = new FarPoint.Web.Spread.SortInfo[1];
//设置分组列和排序方式(默认以第1列分组,列数从0开始计数)
sort[0] = new FarPoint.Web.Spread.SortInfo(1, true);
gdm.Group(sort);
//隐藏分组底部(常用于合计之类)
//FarPoint.Web.Spread.Model.Group group = new Group(gdm, (FarPoint.Web.Spread.Model.Group)gdm.Groups[0], 0, false);
//GroupFooter groupfooter = new GroupFooter(group);
//FpSpread1.Sheets[0].GroupFooterVisible = true;
////设置 ColumnFooter,GroupFooter 第1列公式为 Sum ,用于计算第5列所有单元格加和.
//this.FpSpread1.ActiveSheetView.Columns[0].AggregationType = FarPoint.Web.Spread.Model.AggregationType.Sum;


你可能感兴趣的:(分组,Spread)