回复 12楼gzyupu的帖子
在9#的基础上,添加了一行代码,判断如果是“第一页”,则不关闭:
- void dtb1_TabPageClosing(object sender, TabPageCancelEventArgs e)
- {
- if (e.TabPage.Text == "第1页")
- {
- e.Cancel = true;
- }
- }
复制代码
另外,可通过SetCellStyle设置单元格类型:
- C1.Win.C1FlexGrid.CellStyle cs = this.c1FlexGrid1.Styles.Add("test");
- cs.Border.Style = C1.Win.C1FlexGrid.BorderStyleEnum.Double;
- cs.Border.Direction = C1.Win.C1FlexGrid.BorderDirEnum.Both;
- cs.Border.Color = Color.Black;
- cs.Border.Width = 3;
- this.c1FlexGrid1.SetCellStyle(3, 5, "test");
复制代码 |