DataRelationCollection Class

 

Represents the collection of DataRelation objects for this DataSet.

Namespace:   System.Data
Assembly:  System.Data (in System.Data.dll)

System::Object
  System.Data::InternalDataCollectionBase
    System.Data::DataRelationCollection

public ref class DataRelationCollection abstract : InternalDataCollectionBase

NameDescription
System_CAPS_protmethodDataRelationCollection()

Initializes a new instance of the DataRelationCollection class.

NameDescription
System_CAPS_pubpropertyCount

Gets the total number of elements in a collection.(Inherited from InternalDataCollectionBase.)

System_CAPS_pubpropertyIsReadOnly

Gets a value that indicates whether the InternalDataCollectionBase is read-only.(Inherited from InternalDataCollectionBase.)

System_CAPS_pubpropertyIsSynchronized

Gets a value that indicates whether the InternalDataCollectionBase is synchonized.(Inherited from InternalDataCollectionBase.)

System_CAPS_pubpropertyItem[Int32]

Gets the DataRelation object at the specified index.

System_CAPS_pubpropertyItem[String^]

Gets the DataRelation object specified by name.

System_CAPS_protpropertyList

Gets the items of the collection as a list.(Inherited from InternalDataCollectionBase.)

System_CAPS_pubpropertySyncRoot

Gets an object that can be used to synchronize the collection.(Inherited from InternalDataCollectionBase.)

NameDescription
System_CAPS_pubmethodAdd(DataColumn^, DataColumn^)

Creates a DataRelation with a specified parent and child column, and adds it to the collection.

System_CAPS_pubmethodAdd(array<DataColumn^>^, array<DataColumn^>^)

Creates a DataRelation with the specified parent and child columns, and adds it to the collection.

System_CAPS_pubmethodAdd(DataRelation^)

Adds a DataRelation to the DataRelationCollection.

System_CAPS_pubmethodAdd(String^, DataColumn^, DataColumn^)

Creates a DataRelation with the specified name, and parent and child columns, and adds it to the collection.

System_CAPS_pubmethodAdd(String^, DataColumn^, DataColumn^, Boolean)

Creates a DataRelation with the specified name, parent and child columns, with optional constraints according to the value of the createConstraints parameter, and adds it to the collection.

System_CAPS_pubmethodAdd(String^, array<DataColumn^>^, array<DataColumn^>^)

Creates a DataRelation with the specified name and arrays of parent and child columns, and adds it to the collection.

System_CAPS_pubmethodAdd(String^, array<DataColumn^>^, array<DataColumn^>^, Boolean)

Creates a DataRelation with the specified name, arrays of parent and child columns, and value specifying whether to create a constraint, and adds it to the collection.

System_CAPS_protmethodAddCore(DataRelation^)

Performs verification on the table.

System_CAPS_pubmethodAddRange(array<DataRelation^>^)

Copies the elements of the specified DataRelation array to the end of the collection.

System_CAPS_pubmethodCanRemove(DataRelation^)

Verifies whether the specified DataRelation can be removed from the collection.

System_CAPS_pubmethodClear()

Clears the collection of any relations.

System_CAPS_pubmethodContains(String^)

Verifies whether a DataRelation with the specific name (case insensitive) exists in the collection.

System_CAPS_pubmethodCopyTo(Array^, Int32)

Copies all the elements of the current InternalDataCollectionBase to a one-dimensional Array, starting at the specified InternalDataCollectionBase index.(Inherited from InternalDataCollectionBase.)

System_CAPS_pubmethodCopyTo(array<DataRelation^>^, Int32)

Copies the collection of DataRelation objects starting at the specified index.

System_CAPS_pubmethodEquals(Object^)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_protmethodGetDataSet()

This API supports the product infrastructure and is not intended to be used directly from your code. This method supports the .NET Framework infrastructure and is not intended to be used directly from your code.

System_CAPS_pubmethodGetEnumerator()

Gets an IEnumerator for the collection.(Inherited from InternalDataCollectionBase.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodIndexOf(DataRelation^)

Gets the index of the specified DataRelation object.

System_CAPS_pubmethodIndexOf(String^)

Gets the index of the DataRelation specified by name.

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_protmethodOnCollectionChanged(CollectionChangeEventArgs^)

Raises the CollectionChanged event.

System_CAPS_protmethodOnCollectionChanging(CollectionChangeEventArgs^)

Raises the CollectionChanged event.

System_CAPS_pubmethodRemove(DataRelation^)

Removes the specified relation from the collection.

System_CAPS_pubmethodRemove(String^)

Removes the relation with the specified name from the collection.

System_CAPS_pubmethodRemoveAt(Int32)

Removes the relation at the specified index from the collection.

System_CAPS_protmethodRemoveCore(DataRelation^)

Performs a verification on the specified DataRelation object.

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

NameDescription
System_CAPS_pubeventCollectionChanged

Occurs when the collection has changed.

NameDescription
System_CAPS_pubmethodAsParallel()

Overloaded. Enables parallelization of a query.(Defined by ParallelEnumerable.)

System_CAPS_pubmethodAsQueryable()

Overloaded. Converts an IEnumerable to an IQueryable.(Defined by Queryable.)

System_CAPS_pubmethodCast<TResult>()

Casts the elements of an IEnumerable to the specified type.(Defined by Enumerable.)

System_CAPS_pubmethodOfType<TResult>()

Filters the elements of an IEnumerable based on a specified type.(Defined by Enumerable.)

A DataRelationCollection object enables navigation between related parent/child DataTable objects.

You create a DataRelationCollection object by defining it as a property of either the DataSet or the DataTable, instead of by directly using a constructor. (Use the Relations property of the DataSet, or the ParentRelations property of the DataTable.)

To access the collection, use the Relations property of the DataSet object.

As soon as the collection exists you can manage the objects it contains by using methods such as Add, Clear, and Remove.

.NET Framework
Available since 1.1

This type is safe for multithreaded read operations. You must synchronize any write operations.

Return to top
Show: