To reproduce:
- Add two buttons and a textbox to a RadForm.
- Set the AcceptButton to be the first button.
- Focus the second button and press Enter
Workaround:
protected override bool ProcessCmdKey(ref System.Windows.Forms.Message msg, System.Windows.Forms.Keys keyData)
{
if (keyData == System.Windows.Forms.Keys.Enter)
{
if (this.ActiveControl is Button && this.ActiveControl != this.AcceptButton)
{
((Button)this.ActiveControl).PerformClick();
return true;
}
}
return base.ProcessCmdKey(ref msg, keyData);
}