AutoCompleteBox

4 posts, 0 answers
  1. Code7
    Code7 avatar
    19 posts
    Member since:
    May 2009

    Posted 24 Sep 2013 Link to this post

    For the AutoCompletebox is there an undo method? Typically pressing the ESC key will return the control to it's original state.

    Thanks!
  2. Dimitar
    Admin
    Dimitar avatar
    1404 posts

    Posted 27 Sep 2013 Link to this post

    Hello Albert,

    Thank you for writing.

    I am not sure what you have meant by original state. For example if you want to clear all items when the Escape key is pressed you can do that by subscribing to the KeyDown event: 
    void radAutoCompleteBox1_KeyDown(object sender, KeyEventArgs e)
    {
        if (e.KeyCode == Keys.Escape)
        {
            radAutoCompleteBox1.Text = "";
            radAutoCompleteBox1.CaretIndex = 0;
        }
    }

    If you have meant something else, please specify your precise goals and I will do my best to provide you with a proper solution.

    I hope this helps.

    Regards,
    Dimitar
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Code7
    Code7 avatar
    19 posts
    Member since:
    May 2009

    Posted 27 Sep 2013 Link to this post

    Thanks Dimitar. To clarify I was looking for an Undo method. Meaning if the AutoCompleteBox contained John/Nancy. The user then edits the text by removing John accidently, the user could undo their edit by pressing  the ESC key (as an example) which would return the AutocompleteBox back to it's original content of John/Nancy.

    Hope that helps.


  5. Dimitar
    Admin
    Dimitar avatar
    1404 posts

    Posted 02 Oct 2013 Link to this post

    Hello Albert,

    Thank you for writing back.

    Thanks for clarifying your goals. Unfortunately the RadAutoCompleteBox does not support this functionality. Also in this case there is no clear way to determine when the user have started the editing and thus how far back to return. In this case I can suggest you to create you own logic that will follow you users patterns of using the control.

    I hope this information helps.

    Regards,
    Dimitar
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top