Torna al Thread
private void dataGridView1_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e)
{
TextBox tb = (dataGridView1.EditingControl as TextBox);
if (tb == null)
{
System.Diagnostics.Debugger.Break(); //you changed it to a non TextBox control. Add more support
return;
}
editingBox = tb;
tb.KeyPress += new KeyPressEventHandler(tb_KeyPress);
tb.TextChanged += new EventHandler(tb_TextChanged);
}
void tb_KeyPress(object sender, KeyPressEventArgs e)
{
if (!char.IsNumber(e.KeyChar) == Tasto F6)
Visualizza Form;
}