asp.net.ph

DataRelation.ParentColumns Property

System.Data Namespace   DataRelation Class


Returns the parent columns of this relation.

Syntax


Script [ DataColumn [ ] variable = ] DataRelation.ParentColumns

Property Value


variable An array of DataColumn objects representing the parent columns of this DataRelation.

The property is read only with no default value.

Example

The following example gets the parent columns of a DataRelation.

private void GetParentCols ( ) {
   // get the data relation
   DataRelation dr = myDataSet.Relations [ "CustomerOrders" ]
   // get the parent columns.
   DataColumn [ ] parentCols = dr.ParentColumns;
   // print the ColumnName of each column.
   int i;
   for ( i = 0; i < parentCols.Length; i++ ) {
      Response.Write ( parentCols [ ].ColumnName );
   }
}
  C# VB

See Also

DataRelation Members   DataColumn   ChildColumns Skip Navigation Links




Previous page Back to top Next page

Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

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