回复 3楼xiafu568的帖子
Winform 中 可以通过以下代码实现:
- private void fpSpread1_LeaveCell(object sender, FarPoint.Win.Spread.LeaveCellEventArgs e)
- {
- int row = e.Row;
- int col = e.Column;
- string text = this.fpSpread1.Sheets[0].Cells[row, col].Text;
- if (true)
- {
- e.Cancel = true;
- this.fpSpread1.Sheets[0].SetActiveCell(row, col);
- this.fpSpread1.StartCellEditing(null, false);
- this.fpSpread1.Sheets[0].ActiveRowIndex = row;
- this.fpSpread1.Sheets[0].ActiveColumnIndex = col;
- }
- }
复制代码 |