Skip a cell on TAB in datagridview
Posted on 2006-10-29
I need to skip a cell, that is read only, when the user presses the Tab key.
I have tried the following code to skip over column 2
Protected Overrides Function ProcessCmdKey(ByRef msg As System.Windows.Forms.Message, ByVal keyData As System.Windows.Forms.Keys) As Boolean
Select Case keyData
If grdHSE.CurrentCell.ColumnIndex = 1 Then
grdHSE.CurrentCell = grdHSE(3, grdHSE.CurrentCell.RowIndex)
but it skips to column 4 not 3.
All help much appreciated.