| |||||||||||||||||||
DataSet.Relations PropertySystem.Data Namespace DataSet Class Returns the collection of relations that link tables and allow navigation from parent tables to child tables. Syntax
Return ValueA DataRelationCollection that contains a collection of DataRelation objects; otherwise a null value if no DataRelation objects exist. The property is read only with no default value. ExampleThe following examples demonstrate using the Relations property to access the parent/child relationship between tables in a DataSet.
The first example uses generic code to loop thru the parent and child rows of a given relationship, using the DataRow.GetChildRows ( DataRelation ) method.
The second example is essentially the same, except that it uses the DataRowView.CreateChildView ( DataRelation ) method, and renders the parent and child rows using nested templated controls. The below code shows the method to bind the child control's data source.
See AlsoDataSet Members DataRelation DataTable DataRelationCollection |
| ||||||||||||||||||
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