DataRow.SetParentRow Método
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
Establece la fila primaria de DataRow.
SetParentRow(DataRow) |
Establece la fila primaria de un DataRow con un nuevo DataRow primario especificado. |
SetParentRow(DataRow, DataRelation) |
Establece la fila primaria de un DataRow con un nuevo DataRow primario especificado y DataRelation. |
- Source:
- DataRow.cs
- Source:
- DataRow.cs
- Source:
- DataRow.cs
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)
Parámetros
Se aplica a
.NET 9 otras versiones
Producto | Versiones |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
- Source:
- DataRow.cs
- Source:
- DataRow.cs
- Source:
- DataRow.cs
Establece la fila primaria de un DataRow con un nuevo DataRow primario especificado y 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)
Parámetros
- relation
- DataRelation
Relación DataRelation que se va a utilizar.
Excepciones
Una de las filas no pertenece a una tabla.
Una de las filas es null
.
La relación no pertenece a la colección DataRelationCollection del objeto DataSet.
El objeto DataTable secundario de la relación no es la tabla a la que pertenece esta fila.
Ejemplos
En el ejemplo siguiente se establece la fila primaria de una fila secundaria específica.
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
Se aplica a
.NET 9 otras versiones
Producto | Versiones |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
Comentarios de .NET
.NET es un proyecto de código abierto. Selecciona un vínculo para proporcionar comentarios: