private void buscarcredi(string idC) { DataTable datos = new DataTable(); datos = cre.BusCred(idC); CboCred.DataSource = datos; CboCred.DisplayMember = "id_credito"; CboCred.ValueMember = "id_credito"; AutoCompleteStringCollection coleccion = new AutoCompleteStringCollection(); foreach (DataRow row in datos.Rows) { coleccion.Add(row["id_credito"].ToString()); } CboCred.AutoCompleteCustomSource = coleccion; CboCred.AutoCompleteMode = AutoCompleteMode.Suggest; CboCred.AutoCompleteSource = AutoCompleteSource.CustomSource; if (CboCred.Items.Count > 0) { CboCred.SelectedIndex = 0; } }