Click here to Skip to main content
15,943,008 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
I have one Datatable it's have Customer list and already bind in combobox
like..
CSS
DataTable dataTable = objQBLayer.dtCustomQuery;
           CmbSelctCustomer.DisplayMember = "Name";
           CmbSelctCustomer.DataSource = dataTable;


but.. i want default string in combobox index 0 like "Select Customer"
and i need auto complete in combobox..
Posted

Your question confuses myself.You say you want default string in combobox like "Select Customer",then you say for this you need autocomplete combobox.This isn't a property of autocompleteness.You can simply change the text property of combobox to do this.Hence below are some links for autocomplete combobox..
http://www.c-sharpcorner.com/Blogs/2050/[^]
http://www.java2s.com/Tutorial/CSharp/0460__GUI-Windows-Forms/AutoCompleteComboBox.htm[^]
 
Share this answer
 
like



CSS
DataTable dataTable = objQBLayer.dtCustomQuery;
          CmbSelctCustomer.DisplayMember = "Name";
          CmbSelctCustomer.DataSource = dataTable;
          this.CmbSelctCustomer.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
          this.CmbSelctCustomer.AutoCompleteSource = AutoCompleteSource.ListItems;
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900