I have a combobox that autocompleta with a query and I want to show two fields for example IdProyecto and ProyectoProyecto I want to know the form for when I search in the combo I see both the IdoProject And ProjectName next this is my code that travels and search:
DataTable dt = Datos();
AutoCompleteStringCollection coleccion = new AutoCompleteStringCollection();
//recorrer y cargar los items para el autocompletado
foreach (DataRow row in dt.Rows)
{
coleccion.Add(Convert.ToString(row["CNombreProyecto"]));
coleccion.Add(Convert.ToString(row["CCodigoProyecto"]));
}
return coleccion;