回复 1楼idragonet的帖子
你好,
请参考代码:
- private void c1FlexGrid1_KeyPress(object sender, KeyPressEventArgs e)
- {
- int topRow = this.c1FlexGrid1.Selection.TopRow;
- int endRow = this.c1FlexGrid1.Selection.BottomRow;
- int leftCol = this.c1FlexGrid1.Selection.LeftCol;
- int rightCol = this.c1FlexGrid1.Selection.RightCol;
- for (int i = topRow; i <= endRow; i++)
- {
- for (int j = leftCol; j <= rightCol; j++)
- {
- this.c1FlexGrid1[i, j] = "2";
- }
- }
- }
复制代码 |