Sugerir traducción
 
Otros han sugerido:

progress indicator
No hay más sugerencias.
Evaluar y enviar comentarios
Contraer todo/Expandir todo Contraer todo
Ver contenido:  en paraleloVer contenido: en paralelo
.NET Framework Class Library
DataRow..::.SetParentRow Method (DataRow, DataRelation)

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

Namespace:  System.Data
Assembly:  System.Data (in System.Data.dll)
Visual Basic
Public Sub SetParentRow ( _
    parentRow As DataRow, _
    relation As DataRelation _
)
C#
public void SetParentRow(
    DataRow parentRow,
    DataRelation relation
)
Visual C++
public:
void SetParentRow(
    DataRow^ parentRow, 
    DataRelation^ relation
)
F#
member SetParentRow : 
        parentRow:DataRow * 
        relation:DataRelation -> unit 

Parameters

parentRow
Type: System.Data..::.DataRow
The new parent DataRow.
relation
Type: System.Data..::.DataRelation
The relation DataRelation to use.
ExceptionCondition
RowNotInTableException

One of the rows does not belong to a table

ArgumentNullException

One of the rows is nullNothingnullptra null reference (Nothing in Visual Basic).

ArgumentException

The relation does not belong to the DataRelationCollection of the DataSet object.

InvalidConstraintException

The relation's child DataTable is not the table this row belongs to.

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

Visual Basic
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

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role not supported), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Biblioteca de clases de .NET Framework
DataRow..::.SetParentRow (Método) (DataRow, DataRelation)

Establece la fila primaria de un DataRow con un nuevo DataRow primario especificado y DataRelation.

Espacio de nombres:  System.Data
Ensamblado:  System.Data (en System.Data.dll)
Visual Basic
Public Sub SetParentRow ( _
    parentRow As DataRow, _
    relation As DataRelation _
)
C#
public void SetParentRow(
    DataRow parentRow,
    DataRelation relation
)
Visual C++
public:
void SetParentRow(
    DataRow^ parentRow, 
    DataRelation^ relation
)
F#
member SetParentRow : 
        parentRow:DataRow * 
        relation:DataRelation -> unit 

Parámetros

parentRow
Tipo: System.Data..::.DataRow
Nuevo DataRow primario.
relation
Tipo: System.Data..::.DataRelation
Relación DataRelation que se va a utilizar.
ExcepciónCondición
RowNotInTableException

Una de las filas no pertenece a una tabla.

ArgumentNullException

Una de las filas es nullNothingnullptrreferencia null (Nothing en Visual Basic).

ArgumentException

La relación no pertenece a la colección DataRelationCollection del objeto DataSet.

InvalidConstraintException

El objeto DataTable secundario de la relación no es la tabla a la que pertenece esta fila.

En el ejemplo siguiente se establece la fila primaria de una fila secundaria específica.

Visual Basic
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

.NET Framework

Compatible con: 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Compatible con: 4, 3.5 SP1

Windows 7, Windows Vista SP1 o posterior, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (no se admite Server Core), Windows Server 2008 R2 (se admite Server Core con SP1 o posterior), Windows Server 2003 SP2

.NET Framework no admite todas las versiones de todas las plataformas. Para obtener una lista de las versiones compatibles, vea Requisitos de sistema de .NET Framework.
Contenido de la comunidad   ¿Qué es Community Content?
Agregar contenido nuevo RSS  Anotaciones
Processing
© 2012 Microsoft. Reservados todos los derechos. Términos de uso | Marcas Registradas | Privacidad
Page view tracker