ابتدا یک روال مشابه زیر بنویسید
Private Sub cell_KeyDown(sender As Object, e As KeyEventArgs)
If e.KeyCode = Keys.NumPad6 Then
MsgBox("Not Allowed")
e.SuppressKeyPress = True
End If
End Sub
حالا به رویداد EditingControlShowing برید و کد زیر را بنویسید
AddHandler e.Control.KeyDown, AddressOf cell_KeyDown
حالا شما در روالی که نوشتید میتونید بگید که اگر ستون شماره n بود این کارو انجام بده
If Me.DataGridView1.CurrentCell.ColumnIndex = 1 Then
If e.KeyCode = Keys.NumPad6 Then
MsgBox("Not Allowed")
e.SuppressKeyPress = True
End If
End If
الان در این مثال اگر شما در ستون اول شماه 6 رو تایپ کنید به شما اخطار میده و از ورود اون جلوگیری میکنه...