asp.net.ph

DataRelation.ParentTable Property

System.Data Namespace   DataRelation Class


Returns the parent table of this relation.

Syntax


Script [ DataTable variable = ] DataRelation.ParentTable

Property Value


variable A DataTable that is the parent table of the relation.

The property is read only with no default value.

Example

The following example gets the parent DataTable of a DataRelation.

private void GetParentTable ( ) {
   // get the data relation
   DataRelation dr = myDataSet.Relations [ "CustomerOrders" ];
   // get the parent DataTable of the relation.
   DataTable tbl = dr.ParentTable;
   // print the name and number of rows of the parent table.
   Response.Write ( tbl.TableName + ", " + tbl.Rows.Count );
}
  C# VB

See Also

DataRelation Members   DataTable   ChildTable Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph