편집

다음을 통해 공유


DataGridViewSelectedCellCollection Class

Definition

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

public ref class DataGridViewSelectedCellCollection : System::Windows::Forms::BaseCollection, System::Collections::IList
[System.ComponentModel.ListBindable(false)]
public class DataGridViewSelectedCellCollection : System.Windows.Forms.BaseCollection, System.Collections.IList
[<System.ComponentModel.ListBindable(false)>]
type DataGridViewSelectedCellCollection = class
    inherit BaseCollection
    interface IList
    interface ICollection
    interface IEnumerable
Public Class DataGridViewSelectedCellCollection
Inherits BaseCollection
Implements IList
Inheritance
DataGridViewSelectedCellCollection
Attributes
Implements

Remarks

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

Properties

Count

Gets the total number of elements in the collection.

(Inherited from BaseCollection)
IsReadOnly

Gets a value indicating whether the collection is read-only.

(Inherited from BaseCollection)
IsSynchronized

Gets a value indicating whether access to the ICollection is synchronized.

(Inherited from BaseCollection)
Item[Int32]

Gets the cell at the specified index.

List

Gets a list of elements in the collection.

SyncRoot

Gets an object that can be used to synchronize access to the BaseCollection.

(Inherited from BaseCollection)

Methods

Clear()

Clears the collection.

Contains(DataGridViewCell)

Determines whether the specified cell is contained in the collection.

CopyTo(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)
CopyTo(DataGridViewCell[], Int32)

Copies the elements of the collection to the specified DataGridViewCell array, starting at the specified index.

CreateObjRef(Type)

Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.

(Inherited from MarshalByRefObject)
Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetEnumerator()

Gets the object that enables iterating through the members of the collection.

(Inherited from BaseCollection)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetLifetimeService()
Obsolete.

Retrieves the current lifetime service object that controls the lifetime policy for this instance.

(Inherited from MarshalByRefObject)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
InitializeLifetimeService()
Obsolete.

Obtains a lifetime service object to control the lifetime policy for this instance.

(Inherited from MarshalByRefObject)
Insert(Int32, DataGridViewCell)

Inserts a cell into the collection.

MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
MemberwiseClone(Boolean)

Creates a shallow copy of the current MarshalByRefObject object.

(Inherited from MarshalByRefObject)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Explicit Interface Implementations

ICollection.CopyTo(Array, Int32)

Copies the elements of the collection to the specified array, starting at the specified index.

ICollection.Count

Gets the number of elements in the collection.

ICollection.IsSynchronized

Gets a value indicating whether access to the collection is synchronized (thread safe).

ICollection.SyncRoot

Gets an object that can be used to synchronize access to the collection.

IEnumerable.GetEnumerator()

Returns an enumerator that can be used to iterate through the collection.

IList.Add(Object)

Implements the Add(Object) method. Always throws NotSupportedException.

IList.Clear()

Implements the Clear() method. Always throws NotSupportedException.

IList.Contains(Object)

Determines whether the specified cell is contained in the collection.

IList.IndexOf(Object)

Returns the index of the specified cell.

IList.Insert(Int32, Object)

Implements the Insert(Int32, Object) method. Always throws NotSupportedException.

IList.IsFixedSize

Gets a value indicating whether the collection has a fixed size.

IList.IsReadOnly

Gets a value indicating whether the collection is read-only.

IList.Item[Int32]

Gets the element at the specified index.

IList.Remove(Object)

Implements the Remove(Object) method. Always throws NotSupportedException.

IList.RemoveAt(Int32)

Implements the RemoveAt(Int32) method. Always throws NotSupportedException.

Extension Methods

Cast<TResult>(IEnumerable)

Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable)

Enables parallelization of a query.

AsQueryable(IEnumerable)

Converts an IEnumerable to an IQueryable.

Applies to

See also