Datagridview combobox issue
I have a textbox, enter an ID, click search button that loads a datasource binded datagridview and a datagridview combobox binded to different data source with data.
Problem I am having is when I re-enter a new ID and click search, my code calls the routine to add combobox to datagridview over again and I get the following error:
"Provided column already belongs to the DataGridView control."
dataGridView1.Columns.Add(listcol);
Implemented Clear() for the datagridview. There is no event to clear my datagridview combobox listcol.
Anyone have any advice how I can get around this?
|