Código PHP:
Ver original
Private Sub dgvDocumento_EditingControlShowing(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewEditingControlShowingEventArgs) Handles dgvDocumento.EditingControlShowing Dim ColumnTipoCompr As String = dgvDocumento.CurrentRow.Cells("cod_tipo_documento").Value If ColumnTipoCompr = "01" Then AddHandler e.Control.KeyPress, AddressOf fValidar_KeyPress 'dgvDocumento.CurrentRow.Cells("num_documento").Value. End If If ColumnTipoCompr = "06" Then AddHandler e.Control.KeyPress, AddressOf fValidar_KeyPress 'dgvDocumento.CurrentRow.Cells("num_documento").Value. End If 'VERIFICO QUE LA COLUMNA SEA DE TEXTO If TypeOf e.Control Is TextBox Then 'INDICO LA COLUMNA QUE DESEO CAMBIAR If dgvDocumento.CurrentCell.ColumnIndex = 2 Then 'PONE EN MAYÚSCULAS LA CELDA DEL GRIDVIEW DirectCast(e.Control, TextBox).CharacterCasing = CharacterCasing.Upper End If End If End Sub