Hi there,
I'm trying to handle Upper Case in one single column in my datagridview, but is not working, all the columns are converted to Upper case
Here is my code:
private void myDataGrid_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e)
{
if (myDataGrid.CurrentCell.OwningColumn.Index == 0)
{
((TextBox)e.Control).KeyPress += new KeyPressEventHandler(toUpperCase);
}
}
//And the method toUpperCase
protected void toUpperCase(object sender, KeyPressEventArgs e)
{
e.KeyChar = Char.ToUpper(e.KeyChar);
}Any help would be apreciated
Thanks
Bere