In a DataGridView I have a lot of required cells. When saving this DataGridView I check if one of the cells isn’t filled in.
If one of the celss isn’t filled I give an message and set focus to that cell.
The problem I have is that after focus the cursor stays in position.
So if I want to fill in 200 you see 2 then a 0 and finally the other 0, so the user is left with an 0 instead of 200. If I use the mouse and put it in the cell it’s no problem to fill in 200.
What do I have to do so I can fill in more then 1 character?
I hope I make my self clear, english is not my native language.
Already thnx.
This is a little code I use to set the focus:
dgvError.CurrentCell = dgvError.Rows[selectedValues.rowIndex].Cells[selectedValues.columnName];
dgvError.BeginEdit(false);
I did use the “CurrentCellDirtyStateChanged” event. I don’t know why this is a problem but after I deleted this event, it just worked fine.