Represents a collection that contains the key field of each record in a data source. This class cannot be inherited.
Assembly: System.Web (in System.Web.dll)
Gets the number of items in the collection.
Gets a value indicating whether items in thecan be modified.
Gets a value indicating whether theis synchronized (thread-safe).
Gets the key field at the specified index in the collection.
Gets the object used to synchronize access to the.
Determines whether the specified object is equal to the current object.(Inherited from Object.)
Creates a System.Collections::IEnumerator implemented object that contains all key fields in the .
Serves as the default hash function. (Inherited from Object.)
Returns a string that represents the current object.(Inherited from Object.)
Overloaded. Enables parallelization of a query.(Defined by ParallelEnumerable.)
The BaseDataList::DataKeyField property. This collection does not allow you to manually add or remove items from the collection.class represents a collection of the key fields in the data source. The key field of each record in the data source is stored in this collection. This allows you to store the key field with a data listing control without displaying it in the control. This collection is automatically filled with the values from the field specified by the
The key field is commonly used in a handler for an event, such as ItemCommand or DeleteCommand, as part of an update query string to revise a specific record in the data source. The key field helps the update query string identify the appropriate record to modify.
Use the Count property to determine the number of items in the collection. To programmatically retrieve a key field from a , use one of following methods:
Use the indexer to get a single key field from the collection, using array notation.
Available since 1.1
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.