I am developing a form with datagridview.
The result I want is:
- When user clicks on ReadOnly Cell, the Cursor will move to Editable Cell.
- When user clicks on Editable Cell, the Cursor will be on this Current Editable Cell.
I make this on Cell_Enter Event (I have some reason to code this on Cell_Enter.I have to use Cell_Enter).
DataGridViewCell cell = myGrid.Rows[cursorRow].Cells[cursorCol];
myGrid.CurrentCell = cell;
myGrid.BeginEdit(true);
Clicking on Editable Cell is OK, Clicking on ReadOnly Cell give an Exception Error:
Error->
Operation is not valid because it results in a reentrant call to the SetCurrentCellAddressCore function.
So, Is there a solution for this problem? (When user clicks on ReadOnly Cell, the Cursor will move to Editable Cell.)
Edit:The solution I want is How do I move cursor to Other cell that is not Current cell?
I have found a solution for this problem here.