All,I knew we can set a column editable for a DataGridView. And when finish editing the cell. the CellEndEdit event would be triggered. But I just want
DataGridView
CellEndEdit
Before BeginEdit. Set a variable to identify if current state is edit mode.
BeginEdit
bBeginEdit = true; dgvFileList.BeginEdit(false);
In the Form_Click event
if (bBeginEdit) { dgvFileList.EndEdit(); bBeginEdit = false; }
Thanks,
Joe