回复 1楼darkelf的帖子
问题一,
抱歉,Winforms 平台固定行无法进行编辑,Winforms 您可以通过冻结行来模拟实现,
- this.c1FlexGrid1.Rows.Frozen = 1;
复制代码
问题二,可以通过单元格范围来设置:
- public Form1()
- {
- InitializeComponent();
- this.c1FlexGrid1.Rows.Fixed= 2;
- this.c1FlexGrid1.Rows.Frozen = 2;
- this.c1FlexGrid1.Cols.Frozen = 2;
- this.c1FlexGrid1.Cols.Fixed = 2;
- C1.Win.C1FlexGrid.CellStyle cs;
- cs = this.c1FlexGrid1.Styles.Add("FixedCol");
- cs.BackColor = Color.Gold;
- CellRange cr = this.c1FlexGrid1.GetCellRange(0, 0, 1, 1);
- cr.Style = cs;
- }
复制代码 |