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

ComboBoxAutoComplete

I have ComboBoxAutoComplete bound to a table in a DataSet, I''m using the GridDataBoundImages sample as a test. Added the following to Form1_Load: comboBoxAutoComplete1.AutoCompleteControl.DataSource = _dataSet.Tables["Employees"]; comboBoxAutoComplete1.AutoCompleteControl.Columns.Clear(); AutoCompleteDataColumnInfo col1 = new AutoCompleteDataColumnInfo("Id", 20, false); AutoCompleteDataColumnInfo col2 = new AutoCompleteDataColumnInfo("FirstName", 30, true); AutoCompleteDataColumnInfo col3 = new AutoCompleteDataColumnInfo("LastName", 30, true); col2.MatchingColumn = true; comboBoxAutoComplete1.AutoCompleteControl.Columns.Add(col1); comboBoxAutoComplete1.AutoCompleteControl.Columns.Add(col2); comboBoxAutoComplete1.AutoCompleteControl.Columns.Add(col3); The list is displayed but never updates when rows are added, deleted or modified. ComboBoxAdv does respond to data changes but doesn''t handle multiple columns. How do I get ComboBoxAutoComplete to update? Thanks, Ben.

3 Replies

AD Administrator Syncfusion Team August 10, 2004 05:47 PM UTC

Hi Ben, I have created a sample as per your specifications and have attached it here. It works fine and any changes in the DataSource is reflected in the AutoCompleteComboBox''s dropdown. Please refer to its Form Load event handler below : private void Form1_Load(object sender, System.EventArgs e) { this.oleDbDataAdapter1.Fill(this.dataSet11); this.comboBoxAutoComplete1.AutoCompleteControl.DataSource = this.dataSet11.Tables[0]; this.comboBoxAutoComplete1.DisplayMember = "FirstName"; this.comboBoxAutoComplete1.AutoCompleteControl.Columns.Add(new AutoCompleteDataColumnInfo("EmployeeID", 20, true)); this.comboBoxAutoComplete1.AutoCompleteControl.Columns.Add(new AutoCompleteDataColumnInfo("LastName", 60, true)); this.comboBoxAutoComplete1.AutoCompleteControl.Columns.Add(new AutoCompleteDataColumnInfo("FirstName", 60, true)); : : : this.comboBoxAutoComplete1.AutoCompleteControl.Columns.Add(new AutoCompleteDataColumnInfo("ReportsTo", 40, true)); this.comboBoxAutoComplete1.AutoCompleteControl.Columns[2].MatchingColumn = true; this.comboBoxAutoComplete1.DataBindings.Add("Text", this.dataSet11.Tables[0], "FirstName"); } Let me know if this sample meets your requirements. If not, kindly modify it to show the problem that you are facing and send it back to us. We appreciate your cooperation, and thanks for choosing Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.


AD Administrator Syncfusion Team August 11, 2004 05:48 AM UTC

Hi Guru, Thanks for creating the sample, I''m afraid it doesn''t work for me. Attached is your sample with the addition of a DataGrid bound to the same dataset. What I''d like to be able to do is change the name of the one of the employees to "John Doe" and see "John Doe" appear in the dropdown list for the combobox*. Is this possible please? Many thanks, Ben. * In addition if a record is deleted it gets removed from the list. If a record is added it should appear in the list. comboboxautocomplete_multicolumn_7999_ver2_4337.zip


AD Administrator Syncfusion Team August 12, 2004 03:11 PM UTC

Hi Ben, Thanks for creating Direct-Trac incident 12950 in this regard. I will try to modify my earlier sample as per your reuirements specified above and will update you on Direct-Trac as soon as possible. We appreciate you patience and cooperation. Regards, Guru Patwal Syncfusion, Inc.

Loader.
Live Chat Icon For mobile
Up arrow icon