I have a dataGridView (DGV) control in my project that is bound to a dataset.
Basically, the DGV displays search results, and the user has the ability to choose what fields they want displayed.
The problem is the DGV is remembering what columns were in the last search. I want to be able to clear all columns
and then display the columns from the Dataset every time the user clicks "Search".
dgv.columns.clear works to clear all column headings but won't display the headings from the nest search.
Here is a bit of the code . . .
private sub cmdSearch_click(byVal sender . . .)
Dim da As New OracleClient.OracleDataAdapter(strSQL, oraConn)
dgvSearchResults.DataSource = ds
dgvSearchResults.DataMember = "recordSet"
tslSearchMessage.Text = ds.Tables("recordSet").Rows.Count & " Rows Returned."
Catch ex As Exception
any ideas ?