Gracias.
Código:
Private Sub dgvUit_EditingControlShowing(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewEditingControlShowingEventArgs) Handles dgvUit.EditingControlShowing If e.CellStyle.Format = "N2" Then AddHandler e.Control.KeyPress, AddressOf validar_Keypress End If Private Sub validar_Keypress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) 'Obtener indice de la columna Dim columna As Integer = dgvUit.CurrentCell.ColumnIndex ' Verificar columna actual If columna = 2 Then Dim caracter As Char = e.KeyChar ' referencia a la celda Dim txt As TextBox = CType(sender, TextBox) ' Comprobar si es un número con isNumber, si es el backspace, si el caracter ' es el separador decimal, y que no contiene ya el separador If (Char.IsNumber(caracter)) Or (caracter = ChrW(Keys.Back)) Or (caracter = ".") And (txt.Text.Contains(".") = False) Then e.Handled = False Else e.Handled = True End If End If End Sub