System.Data.DataRow.GetParentRows Method

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

Syntax

public DataRow[] GetParentRows (string relationName)

Parameters

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

Returns

An array of System.Data.DataRow objects or an array of length zero.

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