Protected Overloads Overrides Function ProcessDialogKey(ByVal keyData As Keys) As Boolean If keyData = Keys.Enter Then Dim col As Integer = Me.CurrentCell.ColumnIndex Dim row As Integer = Me.CurrentCell.RowIndex Do gtoLoop: col += 1 If col = (Me.Columns.Count) Then col = 1 row += 1 Exit Do If row = Me.Rows.Count Then Me.DataSource.datasource.tables(Me.DataSource.datamember).rows.add() End If End If If Me.Columns(col).Visible = False Then GoTo gtoLoop Exit Do Loop Me.CurrentCell = Me(col, row) Return True End If Return MyBase.ProcessDialogKey(keyData) End Function Protected Overloads Overrides Sub OnKeyDown(ByVal e As KeyEventArgs) If e.KeyData = Keys.Enter Then Dim col As Integer = Me.CurrentCell.ColumnIndex Dim row As Integer = Me.CurrentCell.RowIndex Do gtoLoop: col += 1 If col = (Me.Columns.Count) Then col = 1 row += 1 If row = Me.Rows.Count Then Me.DataSource.datasource.tables(Me.DataSource.datamember).rows.add() End If Exit Do End If If Me.Columns(col).Visible = False Then GoTo gtoLoop Exit Do Loop Me.CurrentCell = Me(col, row) e.Handled = True End If MyBase.OnKeyDown(e) End Sub