Hello,
I have a form with a RadRibbonBar and a RadGridView.
Within the toolbar I have programmatically added a RadTextBoxElement (and a button) in order to search through the grid.
Everything is working perfectly well except when I try to implement the CTRL+F shortcut. The event do get fired and I am able to catch the requested action, but then I cannot get the textbox to focus.
I have tried both mytextboxelement.TextBoxItem.Focus() and mytextboxelement.Focus() with no success.
Any idea if I'm doing something wrong or if there is a problem ?
Thank you,
I have a form with a RadRibbonBar and a RadGridView.
Within the toolbar I have programmatically added a RadTextBoxElement (and a button) in order to search through the grid.
Everything is working perfectly well except when I try to implement the CTRL+F shortcut. The event do get fired and I am able to catch the requested action, but then I cannot get the textbox to focus.
I have tried both mytextboxelement.TextBoxItem.Focus() and mytextboxelement.Focus() with no success.
private void searchKeyDown(object sender, KeyEventArgs e) { if(e.KeyCode == Keys.F3) btnSearch_Click(null, null); else if (e.KeyCode == Keys.F && e.Modifiers == Keys.Control) { RadTextBoxElement txt = (RadTextBoxElement)this.radRibbonBarButtonGroup1.Items[0]; txt.TextBoxItem.Focus(); } }Any idea if I'm doing something wrong or if there is a problem ?
Thank you,
- OS Information : Windows XP x64 (version 2003) SP2
- Telerik : RadControls for WinForms 2010.3 10.1109
- Microsoft Visual Studio 2008
- .NET 3.5