Does anyone know how to programmatically access the parent row information displayed in the header of a datagrid's child table when the child table is empty? If the child table is not empty, I can navigate up to the parent table via my DataRelation, but what do I do otherwise? I can't use GetParentRow as I have no child records. The parent row is (if the property is turned on) displayed in the grid so it must be available somehow. Would greatly appreciate any help.
Have just discovered answer to my own question:
Dim myCM As CurrencyManager = DataGrid1.BindingContext(DataGrid1.DataSource, parent_table_name)
Dim myindex As Integer = myCM.Position
Dim myRow As DataRow = DataSet1.Tables(parent_table_name).Rows(myindex)