System.Data Namespace DataRelationCollection Class
Adds a DataRelation object to the collection.
[ VB ] Overloads Public Sub Add ( _ ByVal relation As DataRelation _ ) [ C# ] public void Add ( DataRelation relation ); [ C++ ] public: void Add ( DataRelation* relation ); [ JScript ] public function Add ( relation : DataRelation );
If the relation is sucessfully added to the collection, the CollectionChanged event occurs.
The following example adds a new DataRelation using this constructor.
DataRelation categoryId = new DataRelation ( ds.Tables [ 0 ].Columns [ "CategoryID" ], ds.Tables [ 1 ].Columns [ "CategoryID" ] ); ds.Relatons.Add ( categoryId );
Dim categoryId As new DataRelation ( _ ds.Tables ( 0 ).Columns ( "CategoryID" ), _ ds.Tables ( 1 ).Columns ( "CategoryID" ) ) ds.Relations.Add ( categoryId )
DataRelationCollection Members DataRelationCollection.Add Overload List
© 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