System.Data.DataRow.GetParentRow Method

Gets the parent row of a System.Data.DataRow using the specified DataRelation.RelationName of a System.Data.DataRelation.

Syntax

public DataRow GetParentRow (string relationName)

Parameters

relationName
The DataRelation.RelationName of a System.Data.DataRelation.

Returns

The parent System.Data.DataRow of the current row.

Remarks

In a System.Data.DataSet, the collection of all parent System.Data.DataRelation objects for the data set is returned by the DataRow.GetParentRows(string) method.

The System.Data.DataTable also contains a collection of System.Data.DataRelation objects, returned by the DataTable.ParentRelations property.

Requirements

Namespace: System.Data
Assembly: System.Data (in System.Data.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0