Thomas
2007-06-12 19:36:36 UTC
How do you apply formatting to edited cells in a datagridview? I want
to allow the user to type text in either upper or lowercase but after
their edit is complete, I need to shift the value to uppercase.
Here's what I doing:
Private Sub dgridviewAppSettings_CellValueChanged(ByVal sender As
Object, ByVal e As DataGridViewCellEventArgs) Handles
dgridviewAppSettings.CellValueChanged
dgridviewAppSettings.CurrentCell().Value =
dgridviewAppSettings.CurrentCell().Value.ToString().ToUpper
End Sub
This works but the event is fired twice since I'm programmatically
editing the cell after the user does. Is there a way to prevent this?
TIA,
Thomas
to allow the user to type text in either upper or lowercase but after
their edit is complete, I need to shift the value to uppercase.
Here's what I doing:
Private Sub dgridviewAppSettings_CellValueChanged(ByVal sender As
Object, ByVal e As DataGridViewCellEventArgs) Handles
dgridviewAppSettings.CellValueChanged
dgridviewAppSettings.CurrentCell().Value =
dgridviewAppSettings.CurrentCell().Value.ToString().ToUpper
End Sub
This works but the event is fired twice since I'm programmatically
editing the cell after the user does. Is there a way to prevent this?
TIA,
Thomas