Hi Chris
Following your tip; this is my code now
if (e.ColumnIndex == contactNameDataGridViewTextBoxColumn.Index)
{
customersDataGridView.CurrentCell = customersDataGridView[e.ColumnIndex
+ 1, e.RowIndex];
}
at runtime it seems to work but, I get:
System.InvalidOperationException: Operation is not valid because it results
in a reentrant call to the SetCurrentCellAddressCore function.
Also this solution has the disadvantage that the cell cannot be selected by
mouse.
Dieter
"Chris" <no@spam.com> schreef in bericht
news:u7**************@TK2MSFTNGP09.phx.gbl...
Chris wrote: Dieter De Doncker wrote:
Hi
Is there a way to remove DataGridViewColumns from the tab order in a
DataGridView ?
Thx
Dieter De Doncker
You can catch when a Column gets focused and then move it to the next
one. Would that do it for you?
Chris
Forgot to say that you can use the CellEnter event to do this. Just set
your new column:
DataGridView.CurrentCell = DataGridView.Item(e.ColumnIndex + 1,
e.RowIndex)
Chris