NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

DataRelation.ParentTable

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;

Property Value

A DataTable that is the parent table of this relation.

Example [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.
   Debug.Print t.TableName
   Debug.Print t.Rows.Count
End Sub

See Also

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