System.Data Namespace DataRelation Class
Returns the child table of this relation.
Script |
[ DataTable variable = ] DataRelation.ChildTable |
variable |
A DataTable that is the child table of the relation. |
The property is read only with no default value.
The following example gets the child DataTable of a DataRelation.
private void GetChildTable ( ) {
// get the data relation
DataRelation dr = myDataSet.Relations [ "CustomerOrders" ];
// get the child DataTable of the relation.
DataTable tbl = dr.ChildTable;
// print the name and number of rows of the child table.
Response.Write ( tbl.TableName + ", " + tbl.Rows.Count );
}
Private Sub GetChildTable ( )
' get the data relation
Dim dr As DataRelation = myDataSet.Relations ( "CustomerOrders" )
' get the child DataTable of the relation.
Dim tbl As DataTable = dr.ChildTable
' print the name and number of rows of the child table.
Response.Write ( tbl.TableName & ", " & tbl.Rows.Count )
End Sub |
|
C# |
VB |
DataRelation Members DataTable ParentTable