ChildTable Property

DataRelation.ChildTable Property


Gets the child table of this relation.

Namespace:   System.Data
Assembly:  System.Data (in System.Data.dll)

public virtual DataTable ChildTable { get; }

Property Value

Type: System.Data.DataTable

A DataTable that is the child table of the relation.

The following example gets the child DataTable of a DataRelation.

Private Sub GetChildTable()
    ' Get a DataRelation of a DataSet.
    Dim relation As DataRelation = _

    ' Get the child DataTable of the relation.
    Dim table As DataTable = relation.ChildTable

    ' Print the name and number of rows of the child table.
    Console.Writeline("Name: {0} Rowcount: {1}", _
        table.TableName, table.Rows.Count.ToString())
End Sub

.NET Framework
Available since 1.1
Return to top
© 2015 Microsoft