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

AutoCompleteBox

3 Answers 62 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Albert
Top achievements
Rank 1
Albert asked on 25 Sep 2013, 01:27 AM
For the AutoCompletebox is there an undo method? Typically pressing the ESC key will return the control to it's original state.

Thanks!

3 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 27 Sep 2013, 02:36 PM
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 >>
0
Albert
Top achievements
Rank 1
answered on 27 Sep 2013, 02:46 PM
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.


0
Dimitar
Telerik team
answered on 02 Oct 2013, 01:55 PM
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 >>
Tags
AutoCompleteBox
Asked by
Albert
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Albert
Top achievements
Rank 1
Share this question
or