This is a migrated thread and some comments may be shown as answers.

RadTextBoxElement.KeyDown doesn't fire

1 Answer 89 Views
Toolstrip (obsolete as of Q3 2010)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
xben
Top achievements
Rank 1
xben asked on 07 Jun 2007, 04:39 AM
I've added a textbox into a RadToolStrip that I would like to be able to use for searching.  I would like the user to be able to type a search value into this textbox and then hit Enter and then I'll handle the appropriate event and kick off the search.

In addition to the code that was automatically generated by the designer, I added the following 3 lines of code (hoping to catch any one of these 3 events, but would prefer to get the KeyDown):

this.searchTextBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.searchTextBox_KeyPress);

this.searchTextBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.searchTextBox_KeyDown);

this.searchTextBox.KeyUp += new System.Windows.Forms.KeyEventHandler(this.searchTextBox_KeyUp);

I then added the methods specified within the handler code above and added simple code in each to just show a message box.  I also added breakpoints in each of these methods.  When I run my application, I don't see any message boxes when typing into the text box, and my breakpoints are never hit either.

Any suggestions?  Are these 3 events supposed to fire for the RadTextBoxElement within a toolstrip?

Thanks,
Ben

1 Answer, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 07 Jun 2007, 04:04 PM
Hi span,

We're aware if this issue and it is in our TODO list for fixing.  Currently we could suggest the following workaround:

(this.radTextBoxElement1.Children[0] as RadTextBoxItem).KeyPress += new KeyPressEventHandler(radTextBoxElement1_KeyPress);

The same pattern could also be uses with the other key events.

 
All the best,

Georgi
the Telerik team


Instantly find answers to your questions at the new Telerik Support Center
Tags
Toolstrip (obsolete as of Q3 2010)
Asked by
xben
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Share this question
or