Add this on form load
private AutoCompleteStringCollection AutoComplete1 = new AutoCompleteStringCollection();
private AutoCompleteStringCollection AutoComplete2 = new AutoCompleteStringCollection();
Create a function for Autocomplete.
private void setAutoComplete()
{
DataTable dt = new DataTable();
dt = GetData();
for (int i = 0; i < dt.Rows.Count; i++)
{
scAutoComplete.Add(dt.Rows[i]["Auto"].ToString());
scAutoComplete.Add(dt.Rows[i]["Code"].ToString());
}
}
GetData is a another function for Get Data from SQL Server and save in record in DataTable.
Happy coding :)