I want to catch a Backspace control event and delete the last character that my user wrote on a ultracomboEditor.
I've tried both of approaches but they doesnt work..
Approach 1:
protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { if (keyData == Keys.Back) OnKeyPress(new KeyPressEventArgs((Char)Keys.Back)); return base.ProcessCmdKey(ref msg, keyData); }
Approcah 2:
private void ultraComboLeftEyeAxis_KeyPress(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Back) { e.Handled = true; } } this.ultraComboLeftEyeAxis.KeyPress += new System.EventHandler(this.ultraComboLeftEyeAxis_KeyPress);
Can you help me?
Hi,
I suppose that this forum thread is duplicate with this thread http://forums.infragistics.com/forums/t/65895.aspx . Please look my answer there and let me know if you have any questions.
Regards
I'm a bit confused. You don't need to do anything to get the Backspace key to remove the last character typed. This is the default behavior of any text-based control.
So I'm not clear what you are trying to do or why.