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; }
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5