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. Image for the cookie policy date
close icon

Highlighting the matching item in combobox with AutoComplete

I have an AutoComplete extender attached to a standard combobox. It works and moves with the text that is entered, but the matching text is not automatically selected. When I hit enter or tab, the correct "text" gets put into the textbox portion of the control, but the actual "ValueMember" doesn''t get updated. So, I am looking for a solution to actually highlight as I type and select the correct member when the text is picked. Thanks! Jeff Block

3 Replies

AS Arun Srinivasan Syncfusion Team December 8, 2003 06:53 PM UTC

Hi Jeff, 1. If you want the text to filled as you type in the Combobox, you need to set the AutoComplete on autocomplete property to AutoAppend. If you set this property to Both, then you will have both autosuggest and autoappend enabled. 2. Only the text property of the Combobox is set when you use the AutoComplete control, so you could set the corresponding ValueMember of the combobox using the AutoCompleteItemSelected event of the AutoComplete control. Regards, Arun


AD Administrator Syncfusion Team December 9, 2003 02:04 PM UTC

Arun, I see absolutely no affect of the the AutoComplete control being set to either AutoAppend or Both. Also, the ItemSelected event never seems to get fired! I put some Debug statements in the event handler, but the statement never gets executed. Any ideas? Jeff >Hi Jeff, > >1. If you want the text to filled as you type in the Combobox, you need to set the AutoComplete on autocomplete property to AutoAppend. If you set this property to Both, then you will have both autosuggest and autoappend enabled. > >2. Only the text property of the Combobox is set when you use the AutoComplete control, so you could set the corresponding ValueMember of the combobox using the AutoCompleteItemSelected event of the AutoComplete control. > >Regards, >Arun >


AD Administrator Syncfusion Team December 9, 2003 08:33 PM UTC

Hi Jeff, The AutoComplete control must be aware of the data to enable this feature. I am enclosing a sample which demonstrates what you are looking for. It consists of a form with a combobox and an autocomplete control. Here is how the AutoCompleteControl gets it''s data: this.autoComplete1.DataSource = this.itemsList; The combobox''s AutoComplete on autocomplete property is set to both. There are more samples in the \Syncfusion\Essential Suite\Tools\samples\Editors Package\AutoComplete directory. Regards Arun autocomplete_combobox_9207.zip

Loader.
Live Chat Icon For mobile
Up arrow icon