Example #1
0
        private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
        {
            List <string> dt    = service.GetAvailableCompanyNames();
            List <string> locDt = service.GetAvailableLocNames();

            for (int i = 0; i <= dt.Count - 1; i++)
            {
                namesCollection.Add(dt[i].ToString());
            }
            companyBX.AutoCompleteMode         = AutoCompleteMode.Suggest;
            companyBX.AutoCompleteSource       = AutoCompleteSource.CustomSource;
            companyBX.AutoCompleteCustomSource = namesCollection;



            for (int i = 0; i <= locDt.Count - 1; i++)
            {
                locCollection.Add(locDt[i].ToString());
            }
            locationBX.AutoCompleteMode         = AutoCompleteMode.Suggest;
            locationBX.AutoCompleteSource       = AutoCompleteSource.CustomSource;
            locationBX.AutoCompleteCustomSource = locCollection;
        }