RadTextBoxElement.KeyDown doesn't fire

Thread is closed for posting
2 posts, 0 answers
  1. xben
    xben avatar
    5 posts
    Member since:
    Sep 2006

    Posted 06 Jun 2007 Link to this post

    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?


  2. Georgi
    Georgi avatar
    212 posts

    Posted 07 Jun 2007 Link to this post

    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,

    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top