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

Autocomplete matching across multiple columns

I am currently working on a user control that uses a text box, label and autoComplete control.

The autoComplete control has two columns defined, one for the customer code and a second for the customer name.

Currently matching is done against the customer code but it looks like the client may want matching to be done against both the code and the customer name.

Can this be done with the out of the box autoComplete functionality or will this require creating a specialized autoComplete control that inherits from the autoComplete class?

Any suggestions of approaches would be appreciated.

3 Replies

MU Murugan Syncfusion Team February 12, 2007 11:16 PM UTC

Hi,

AutoComplete column Matching could be assigned for more than one columns.

Here is the code snippet :

this.comboBoxAutoComplete1.AutoCompleteControl.Columns[1].MatchingColumn = true;
this.comboBoxAutoComplete1.AutoCompleteControl.Columns[2].MatchingColumn = true;

Herewith I have attached the sample. Please refer to the sample and let me know if it helps.

TAC_56258

Thank you for using Syncfusion products.

Regards,
Murugan P.S


LA lab February 13, 2007 12:40 AM UTC

Thanks for the response, however, I just ran your example and it only showed the autoComplete functioning on the last column which the matchingColumn was set to true.

I tried this using the AutoComplete (as opposed to the AutoCompleteComboBox) and had the same behavior. While debugging I checked the MatchingColumn properties and only the last one set remained true. The previous were switched to false.

I ran your sample and got the following results:
J - no match but should have displayed James Watt
S - no match but should have displayed Sherlock Holmes
W - found James Watt
H - found Sherlock Homes.

Let me know if this is a bug.

Thanks.

(VS .Net 2003, Syncfusion Windows 4.2.***)


MU Murugan Syncfusion Team February 13, 2007 09:00 PM UTC

Hi,

We are really sorry for the previous update.

We could not set more than one column as MatchingColumn. But we could achieve this by handling the KeyUp event of the ComboBoxAutoComplete control. I have modified the sample. Please refer to this and let me know if it helps.

TAC_56258

Thank you for your patience.

Regards,
Murugan P.S

Loader.
Live Chat Icon For mobile
Up arrow icon