We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to Select Text in Auto Complete like TextBox.SelectAll()

Thread ID:

Created:

Updated:

Platform:

Replies:

99433 May 20,2011 02:07 AM UTC Jun 1,2011 03:46 AM UTC General Discussion 5
loading
Tags: General Discussion
Tun Nwe Aung
Asked On May 20, 2011 02:07 AM UTC

Hi,

In AutoComplete Control, After I selected the item in drop down list, I want to highlight the text of selected item. How can it be done? Please advise. Thanks.


Iniyen M A [Syncfusion]
Replied On May 24, 2011 08:37 AM UTC

Hi Tun,

Thanks for your interest in Syncfusion product.

You can achieve your requirement by using the AutoComplete's DropDownClosed event. For more information i have included the code snippet as follows.

[Code Snippet]
this.autoComplete1.DropDownClosed += new Syncfusion.Windows.Forms.PopupClosedEventHandler(this.autoComplete1_DropDownClosed);
private void autoComplete1_DropDownClosed(object sender, Syncfusion.Windows.Forms.PopupClosedEventArgs e)
{
this.textBoxExt1.SelectAll();
}

Please let us know if you need further assistance.

Regards,
Iniyen M.A.



Tun Nwe Aung
Replied On May 30, 2011 02:30 AM UTC

Hi,
Thanks for your reply. There is no DropDownClosed event in wpf AutoComplete control. Please advise.


Deenadhayalan M [Syncfusion]
Replied On May 31, 2011 01:49 PM UTC

Hi Tun,

Thanks for your interest in Syncfusion product.

To highlight the text of selecteditem in Autocomplete control by using the AutoComplete's IsDropDownOpenChanged event. Please find the workaround sample under the following location for your reference.

"PART_EditableTextBox" is a Textbox name which is used in the style of Autocomplete control source.

Please let us know if you have any queries.

Thanks,
Deenadhayalan



99433_Autocomplete_2de928aa.zip

Tun Nwe Aung
Replied On June 1, 2011 03:13 AM UTC

Thank you so much. It's working great.


Deenadhayalan M [Syncfusion]
Replied On June 1, 2011 03:46 AM UTC

Hi Tun,

Thank you for the udpate.

Regards,
Deenadhayalan


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;