c# - Filter in ComboBox -
i fill combobox database values this:
public void fillcombo() { using (sqlconnection mydatabaseconnection = new sqlconnection(myconnectionstring.connectionstring)) { mydatabaseconnection.open(); using (sqlcommand mysqlcommand = new sqlcommand("select description librarycongressclassificationoutline", mydatabaseconnection)) using (sqldatareader sqlreader = mysqlcommand.executereader()) { while (sqlreader.read()) { string desc = sqlreader.getstring(sqlreader.getordinal("description")); combobox1.items.add(desc); } } } }
how filter data when type in combobox , automatically display data in comboxselection something(don't know called) without clicking
you need play autocomplete: http://msdn.microsoft.com/en-us/library/system.windows.forms.combobox.autocompletemode.aspx
Comments
Post a Comment