This documentation is archived and is not being maintained.

DataRelation.ChildTable Property

Gets the child table of this relation.

[Visual Basic]
Public Overridable ReadOnly Property ChildTable As DataTable
public virtual DataTable ChildTable {get;}
public: __property virtual DataTable* get_ChildTable();
public function get ChildTable() : DataTable;

Property Value

A DataTable that is the child table of the relation.


[Visual Basic] The following example gets the child DataTable of a DataRelation.

[Visual Basic] 
Private Sub GetChildTable()
    Dim t As DataTable
    Dim dr As DataRelation
    ' Get a DataRelation of a DataSet.
    dr = DataSet1.Relations("CustomerOrders")
    ' Get the child DataTable of the relation.
    t = dr.ChildTable
    ' Print the name and number of rows of the child table.
    Debug.Write( t.TableName, t.Rows.Count.ToString())
 End Sub

[C#, C++, JScript] No example is available for C#, C++, or JScript. To view a Visual Basic example, click the Language Filter button Language Filter in the upper-left corner of the page.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

DataRelation Class | DataRelation Members | System.Data Namespace | DataTable | ParentTable