Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

DataGridViewSelectedCellCollection Class

Represents a collection of cells that are selected in a DataGridView.

System.Object
  System.MarshalByRefObject
    System.Windows.Forms.BaseCollection
      System.Windows.Forms.DataGridViewSelectedCellCollection

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)
[ListBindableAttribute(false)]
public class DataGridViewSelectedCellCollection : BaseCollection, 
	IList, ICollection, IEnumerable

The DataGridViewSelectedCellCollection type exposes the following members.

  NameDescription
Public propertyCountGets the total number of elements in the collection. (Inherited from BaseCollection.)
Public propertyIsReadOnlyGets a value indicating whether the collection is read-only. (Inherited from BaseCollection.)
Public propertyIsSynchronizedGets a value indicating whether access to the ICollection is synchronized. (Inherited from BaseCollection.)
Public propertyItemGets the cell at the specified index.
Protected propertyListGets a list of elements in the collection. (Overrides BaseCollection.List.)
Public propertySyncRootGets an object that can be used to synchronize access to the BaseCollection. (Inherited from BaseCollection.)
Top
  NameDescription
Public methodClearInfrastructure. Clears the collection.
Public methodContainsDetermines whether the specified cell is contained in the collection.
Public methodCopyTo(Array, Int32)Copies all the elements of the current one-dimensional Array to the specified one-dimensional Array starting at the specified destination Array index. (Inherited from BaseCollection.)
Public methodCopyTo(DataGridViewCell[], Int32)Copies the elements of the collection to the specified DataGridViewCell array, starting at the specified index.
Public methodCreateObjRefCreates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetEnumeratorGets the object that enables iterating through the members of the collection. (Inherited from BaseCollection.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetLifetimeServiceRetrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodInitializeLifetimeServiceObtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Public methodInsertInfrastructure. Inserts a cell into the collection.
Protected methodMemberwiseClone()Creates a shallow copy of the current Object. (Inherited from Object.)
Protected methodMemberwiseClone(Boolean)Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top
  NameDescription
Public Extension MethodAsParallelEnables parallelization of a query. (Defined by ParallelEnumerable.)
Public Extension MethodAsQueryableConverts an IEnumerable to an IQueryable. (Defined by Queryable.)
Public Extension MethodCast<TResult>Casts the elements of an IEnumerable to the specified type. (Defined by Enumerable.)
Public Extension MethodOfType<TResult>Filters the elements of an IEnumerable based on a specified type. (Defined by Enumerable.)
Top
  NameDescription
Explicit interface implemetationPrivate methodICollection.CopyToCopies the elements of the collection to the specified array, starting at the specified index.
Explicit interface implemetationPrivate propertyICollection.CountGets the number of elements in the collection.
Explicit interface implemetationPrivate propertyICollection.IsSynchronizedGets a value indicating whether access to the collection is synchronized (thread safe).
Explicit interface implemetationPrivate propertyICollection.SyncRootGets an object that can be used to synchronize access to the collection.
Explicit interface implemetationPrivate methodIEnumerable.GetEnumeratorReturns an enumerator that can be used to iterate through the collection.
Explicit interface implemetationPrivate methodIList.AddImplements the Add method. Always throws NotSupportedException.
Explicit interface implemetationPrivate methodIList.ClearImplements the Clear method. Always throws NotSupportedException.
Explicit interface implemetationPrivate methodIList.ContainsDetermines whether the specified cell is contained in the collection.
Explicit interface implemetationPrivate methodIList.IndexOfReturns the index of the specified cell.
Explicit interface implemetationPrivate methodIList.InsertImplements the Insert method. Always throws NotSupportedException.
Explicit interface implemetationPrivate propertyIList.IsFixedSizeGets a value indicating whether the collection has a fixed size.
Explicit interface implemetationPrivate propertyIList.IsReadOnlyGets a value indicating whether the collection is read-only.
Explicit interface implemetationPrivate propertyIList.ItemGets the element at the specified index.
Explicit interface implemetationPrivate methodIList.RemoveImplements the Remove method. Always throws NotSupportedException.
Explicit interface implemetationPrivate methodIList.RemoveAtImplements the RemoveAt method. Always throws NotSupportedException.
Top

The order of cells in the collection is not guaranteed to match the order in which they were selected.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.