S
scorpion53061
I would like to load a dataset, create a dataview and reference that
dataview in another form. I decalred in a module
Public dv as Dataview
and in the the form's loading process I fill the data set and say:
dv = dstest.Tables(0).DefaultView
then on the form where I am going ot use the view:
If TabControl1.SelectedIndex = 4 Then
dv = New DataView(Dstest1.Tables("test"), "TypeOfCitation =
'testtype'", "sorttest", DataViewRowState.CurrentRows)
DataGridSH.DataSource = dv
DataGridSH.Visible = True
Exit Sub
End If
I tried inheriting the form it was built on and that didn't work.
Do I need to remove references in the code of the form getting the dataview
to the dataset being used? Or am I missing something else?
I never dispose of that form that it was created on.
dataview in another form. I decalred in a module
Public dv as Dataview
and in the the form's loading process I fill the data set and say:
dv = dstest.Tables(0).DefaultView
then on the form where I am going ot use the view:
If TabControl1.SelectedIndex = 4 Then
dv = New DataView(Dstest1.Tables("test"), "TypeOfCitation =
'testtype'", "sorttest", DataViewRowState.CurrentRows)
DataGridSH.DataSource = dv
DataGridSH.Visible = True
Exit Sub
End If
I tried inheriting the form it was built on and that didn't work.
Do I need to remove references in the code of the form getting the dataview
to the dataset being used? Or am I missing something else?
I never dispose of that form that it was created on.