Hello,
my Problem is an DataGridView named "Datenansicht".
Dim sql As String
Dim data As New DataSet
Dim dataShow As New DataSet
sql = "select Eintrag_ID, Erfasser, Kategorie, Uhrzeit from Nutzereinträge"
db.ReturnDatagrid(sql).Fill(dataShow)
This is how the DataGridView is filled.
Now there are Buttons who will filter the Entries in the "Datenansicht"
These re-set the DataGridView:
Dim sql As String = "select Value,ValueType from DropDownValues order by ValueType"
Dim data As New DataSet
sql = "select Erfasser, Kategorie, Uhrzeit from Nutzereinträge where Eintrag_ID Not in (Select Eintrag_ID from QMEinträge)"
db.ReturnDatagrid(sql).Fill(data)
Datenansicht.DataSource = Nothing
Datenansicht.DataSource = data.Tables(0)
Datenansicht.Refresh()
This works, the new, filtered entries are displayed in the "Datenansicht".
But it completely breaks the events that correspond with the DataGridView "Datenansicht"
Datenansicht_SelectionChanged
completely stops working
What I have tried:
I tried resetting the data source, clearing the whole datagridview... Nothing worked.