ParentTable Property

DataRelation.ParentTable Property

Gets the parent DataTable of this DataRelation.

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

Property Value

A DataTable that is the parent table of this relation.


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

[Visual Basic] 
Private Sub GetParentTable()
    Dim t As DataTable
    Dim r As DataRelation
    ' Get a DataRelation of a DataSet.
    r = DataSet1.Relations("CustomerOrders")
    ' Get the parent DataTable of the relation.
    t = r.ParentTable
    ' Print the name and number of rows of the parent table.
 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 | ChildTable

© 2016 Microsoft