DataGridViewCellCollection

Wisej.Web.DataGridViewCellCollection

Namespace: Wisej.Web

Assembly: Wisej.Framework (3.2.0.0)

Represents a collection of cells in a DataGridViewRow.

public class DataGridViewCellCollection : BaseCollection, IList, IList<DataGridViewCell>, ICollection<DataGridViewCell>, IEnumerable<DataGridViewCell>

Constructors

DataGridViewCellCollection(row)

Initializes a new instance of the DataGridViewCellCollection class.

Name
Type
Description

row

The DataGridViewRow that owns the collection.

Properties

Item(column)

DataGridViewCell: Returns or sets the cell contained in the specified column .

Throws:

Item(index)

DataGridViewCell: Returns or sets the cell at the provided index location.

Throws:

Item(columnName)

DataGridViewCell: Returns or sets the cell in the column with the provided name.

Throws:

Methods

Add(cell)

Adds a cell to the collection.

Parameter
Type
Description

cell

A DataGridViewCell to add to the collection.

Returns: Int32. The position in which to insert the new element.

Throws:

AddRange(cells)

Adds an array of cells to the collection.

Parameter
Type
Description

cells

The array of DataGridViewCell objects to add to the collection.

Throws:

AddRangeInternal(cells)

Adds an array of cells to the collection.

Parameter
Type
Description

cells

The array of DataGridViewCell objects to add to the collection.

Throws:

Clear()

Clears all cells from the collection.

Throws:

Contains(cell)

Determines whether the specified cell is contained in the collection.

Parameter
Type
Description

cell

A DataGridViewCell to locate in the collection.

Returns: Boolean. true if cell is in the collection; otherwise, false.

CopyTo(array, index)

Copies the entire collection of cells into an array at a specified location within the array.

Parameter
Type
Description

array

The destination array to which the contents will be copied.

index

The index of the element in array at which to start copying.

IndexOf(cell)

Returns the index of the specified cell.

Parameter
Type
Description

cell

The cell to locate in the collection.

Returns: Int32. The zero-based index of the value of cell parameter, if it is found in the collection; otherwise, -1.

Insert(index, cell)

Inserts a cell into the collection at the specified index.

Parameter
Type
Description

index

The zero-based index at which to place cell .

Throws:

Remove(cell)

Removes the specified cell from the collection.

Parameter
Type
Description

cell

The DataGridViewCell to remove from the collection.

Throws:

RemoveAt(index)

Removes the cell at the specified index.

Parameter
Type
Description

index

The zero-based index of the DataGridViewCell to be removed.

Throws:

Events

CollectionChanged

CollectionChangeEventHandler Fired when the collection changes.

Last updated