Hello,
I'm working in VS 2005 VB.
I have a windows form with datagridview. The DataSource is filtered based on a relation. On the Load Event of the form I would like to create a Dataview that uses the filtered child set of records displayed in the DataGridView and display a subset of those records.
I don't know how to reference the current set of child records to then apply the dataview to. Is that possible?
My code is:
Dim dv As New DataView(DataSet.Relations("rlBParentChildAll").ChildTable)
' A filter statement to be applied to the Child Records
dv.RowFilter =
"PrimaryAddress = 0"
'Make the dataview the Recordsourcefor the datagridview
dgAddressesAll.DataSource = dv
The DataGridView now has all the records in the Child Table that match the criteria. Not the child records with the Filter.
Is this possible to just apply a DataView to Child records to further filter them?
Thanks for your thoughts