DataRow.SetParentRow Metoda

Definicja

Ustawia wiersz nadrzędny elementu DataRow.

Przeciążenia

SetParentRow(DataRow)

Ustawia wiersz nadrzędny obiektu DataRow z określonym nowym elementem nadrzędnym DataRow.

SetParentRow(DataRow, DataRelation)

Ustawia wiersz nadrzędny obiektu DataRow z określonym nowym elementem nadrzędnym DataRow i DataRelation.

SetParentRow(DataRow)

Źródło:
DataRow.cs
Źródło:
DataRow.cs
Źródło:
DataRow.cs

Ustawia wiersz nadrzędny obiektu DataRow z określonym nowym elementem nadrzędnym 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)

Parametry

parentRow
DataRow

Nowy element nadrzędny DataRow.

Dotyczy

SetParentRow(DataRow, DataRelation)

Źródło:
DataRow.cs
Źródło:
DataRow.cs
Źródło:
DataRow.cs

Ustawia wiersz nadrzędny obiektu DataRow z określonym nowym elementem nadrzędnym DataRow i 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)

Parametry

parentRow
DataRow

Nowy element nadrzędny DataRow.

relation
DataRelation

Relacja DataRelation do użycia.

Wyjątki

Jeden z wierszy nie należy do tabeli

Jednym z wierszy jest null.

Relacja nie należy do DataRelationCollectionDataSet obiektu .

Element podrzędny DataTable relacji nie jest tabelą, do którego należy ten wiersz.

Przykłady

Poniższy przykład ustawia wiersz nadrzędny określonego wiersza podrzędnego.

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

Dotyczy