Gets the parent table of this relation.
[Visual Basic] Overridable Public ReadOnly Property ParentTable As DataTable [C#] public DataTable ParentTable {virtual get;} [C++] public: __property virtual DataTable* get_ParentTable(); [JScript] public function get ParentTable() : DataTable;
A DataTable that is the parent table of this relation.
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. Debug.Print t.TableName Debug.Print t.Rows.Count End Sub
DataRelation Class | DataRelation Members | System.Data Namespace | DataTable | ChildTable