void dataGridView1_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e)
{
DataGridView dgv = (DataGridView)sender;
if (e.Control is DataGridViewTextBoxEditingControl)
{
DataGridViewTextBoxEditingControl editControl = (DataGridViewTextBoxEditingControl)e.Control;
if (dgv.CurrentCell.OwningColumn.Name == "Column1")
{
editControl.CharacterCasing = CharacterCasing.Upper;
}
else
{
editControl.CharacterCasing = CharacterCasing.Normal;
}
}
}
{
DataGridView dgv = (DataGridView)sender;
if (e.Control is DataGridViewTextBoxEditingControl)
{
DataGridViewTextBoxEditingControl editControl = (DataGridViewTextBoxEditingControl)e.Control;
if (dgv.CurrentCell.OwningColumn.Name == "Column1")
{
editControl.CharacterCasing = CharacterCasing.Upper;
}
else
{
editControl.CharacterCasing = CharacterCasing.Normal;
}
}
}