DataRow.SetParentRow 메서드

정의

DataRow의 부모 행을 설정합니다.

오버로드

SetParentRow(DataRow)

지정된 새 부모 DataRow를 가지는 DataRow의 부모 행을 설정합니다.

SetParentRow(DataRow, DataRelation)

지정된 새 부모 DataRowDataRow을 가지는 DataRelation의 부모 행을 설정합니다.

SetParentRow(DataRow)

Source:
DataRow.cs
Source:
DataRow.cs
Source:
DataRow.cs

지정된 새 부모 DataRow를 가지는 DataRow의 부모 행을 설정합니다.

public:
 void SetParentRow(System::Data::DataRow ^ parentRow);
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)

매개 변수

parentRow
DataRow

새 부모 DataRow입니다.

적용 대상

SetParentRow(DataRow, DataRelation)

Source:
DataRow.cs
Source:
DataRow.cs
Source:
DataRow.cs

지정된 새 부모 DataRowDataRow을 가지는 DataRelation의 부모 행을 설정합니다.

public:
 void SetParentRow(System::Data::DataRow ^ parentRow, System::Data::DataRelation ^ relation);
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)

매개 변수

parentRow
DataRow

새 부모 DataRow입니다.

relation
DataRelation

사용할 관계 DataRelation입니다.

예외

행 중의 하나가 테이블에 속하지 않는 경우

행 중 하나가 null인 경우

관계가 DataRelationCollection 개체의 DataSet에 속하지 않은 경우

관계의 자식 DataTable이 이 행이 속한 테이블이 아닌 경우

예제

다음 예제에서는 특정 자식 행의 부모 행을 설정합니다.

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

적용 대상