Having trouble with a data grid view.
Three columns, first one I want to be uppercase, second one normal, and third numbers only.
Third column works fine.
If I click on the second column it appears in uppercase, but ONLY the first time I enter the column.
Seems strange, what am I missing?
End Sub
Auguy
Sylvania/Toledo Ohio
Three columns, first one I want to be uppercase, second one normal, and third numbers only.
Third column works fine.
If I click on the second column it appears in uppercase, but ONLY the first time I enter the column.
Seems strange, what am I missing?
Code:
Private Sub dgvException_EditingControlShowing(ByVal sender As Object, ByVal e As DataGridViewEditingControlShowingEventArgs) Handles dgvException.EditingControlShowing
If TypeOf e.Control Is TextBox Then
Select Case dgvException.CurrentCell.ColumnIndex
Case ExceptionIDColNbr
DirectCast(e.Control, TextBox).CharacterCasing = CharacterCasing.Upper
Case DescriptionColNbr
DirectCast(e.Control, TextBox).CharacterCasing = CharacterCasing.Normal
Case SortNbrColNbr
AddHandler CType(e.Control, TextBox).KeyPress, AddressOf TextBox_keyPress2
End Select
End If
Auguy
Sylvania/Toledo Ohio