Based on somebody's answer to a previous question, I enforce character casing in datagridview cells as seen in the attached code.
Now I need to selectively enforce casing. That is, for colDesc1 I don't want to enforce casing whereas for colItemNo I do want to enforce casing.
I can't find a way to do this. I tried e.Control.Name, but it is an empty string. I noticed e.Control.Tag, but cannot assign a tag in the datagridview interface. I tried e.Control.Location, but that didn't work.
private void dgvMain_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e)
if (e.Control is TextBox)
((TextBox)e.Control).CharacterCasing = CharacterCasing.Upper;