DataRow.SetParentRow DataRow.SetParentRow DataRow.SetParentRow DataRow.SetParentRow Method

Definition

Sets the parent row of a DataRow.

Overloads

SetParentRow(DataRow) SetParentRow(DataRow) SetParentRow(DataRow) SetParentRow(DataRow)

Sets the parent row of a DataRow with specified new parent DataRow.

SetParentRow(DataRow, DataRelation) SetParentRow(DataRow, DataRelation) SetParentRow(DataRow, DataRelation) SetParentRow(DataRow, DataRelation)

Sets the parent row of a DataRow with specified new parent DataRow and DataRelation.

SetParentRow(DataRow) SetParentRow(DataRow) SetParentRow(DataRow) SetParentRow(DataRow)

Sets the parent row of a DataRow with specified new parent DataRow.

public:
 void SetParentRow(System::Data::DataRow ^ parentRow);
public void SetParentRow (System.Data.DataRow parentRow);
member this.SetParentRow : System.Data.DataRow -> unit
Public Sub SetParentRow (parentRow As DataRow)

Parameters

parentRow
DataRow DataRow DataRow DataRow

The new parent DataRow.

SetParentRow(DataRow, DataRelation) SetParentRow(DataRow, DataRelation) SetParentRow(DataRow, DataRelation) SetParentRow(DataRow, DataRelation)

Sets the parent row of a DataRow with specified new parent DataRow and DataRelation.

public:
 void SetParentRow(System::Data::DataRow ^ parentRow, System::Data::DataRelation ^ relation);
public void SetParentRow (System.Data.DataRow parentRow, System.Data.DataRelation relation);
member this.SetParentRow : System.Data.DataRow * System.Data.DataRelation -> unit
Public Sub SetParentRow (parentRow As DataRow, relation As DataRelation)

Parameters

parentRow
DataRow DataRow DataRow DataRow

The new parent DataRow.

Exceptions

Examples

The following example sets the parent row of a specific child row.

Private Sub SetParent()
    ' Get a ParentRow and a ChildRow from a DataSet.
    Dim childRow As DataRow = _
        DataSet1.Tables("Orders").Rows(1)
    Dim parentRow As DataRow = _
        DataSet1.Tables("Customers").Rows(20)

    ' Set the parent row of a DataRelation.
    childRow.SetParentRow(parentRow, _
        DataSet1.Relations("CustomerOrders"))
End Sub

Applies to