aspxtreme

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



Books and more ...


Suggested Reading

Need a break ?



Previous page Back to top Next page

Check out related books at Amazon

© 2000-2008 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 aspxtreme