0
votes

I am working with Syncfusion tools, and am trying to add a ComboBoxAutoComplete control to a Windows form. I have a DataTable that I'm using as my DataSource with two columns: ID and Name. I set the DataSource, DisplayMember, and ValueMember properties like so:

ComboBox1.AutoCompleteControl.DataSource = table
ComboBox1.DisplayMember = "Name"
ComboBox1.ValueMember = "ID"

The control loads correctly, but it appears that the DisplayMember does not get applied. The control will display only the ID of the selected item. When I expand the drop-down, it displays the entire table (both columns). I tried setting the DisplayMember and ValueMember directly on the AutoCompleteControl, but those properties do not exist. Is there a different property that is used to control what text is displayed in the ComboBoxAutoComplete control?

1

1 Answers

0
votes

We have prepared the simple sample in which we have assigned data table to "DataSource" property of AutoCompleteControl inside the ComboBoxAutoComplete to enable the AutoComplete features.

To display the value based on DisplayMember assigned the Data table columns to “Columns” (collection property) of AutoCompleteControl and set “MatchingColumn” value as True for which column has been set in DisplayMember.

Please check with the sample from below location.

Sample: ComboBoxAutoComplete_Sample

Regards,

Keerthana J