I give up, I have not found an answer, I am a beginner in C # and I have a class where every weekend the teacher leaves us a challenge-type task, and this time it was a search engine, but using the data generated via a code. single column of the gridview (the data was already, I just have to write the search engine code) and it is assumed that what must happen is that you write a letter in the textbox and it displays the words that begin with that letter within the gridview. After a long search I found the following code that I do not even know if it is the correct one, the internet is not much use because the tutorials are based on SQL
string[] productListSearch = new string[InventoryTable.Rows.Count];
for (int unitP = 0; unitP < InventoryTable.Rows.Count; unitP++)
{
productListSearch[unitP] = Convert.ToString(InventoryTable.Rows[unitP].Cells[0].Value);
}
InventorySearch.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
InventorySearch.AutoCompleteSource = AutoCompleteSource.CustomSource;
InventorySearch.AutoCompleteCustomSource.AddRange(productListSearch);