Skip to main content
Version: 3.5

DataGridViewCellCollection

Namespace: Wisej.Web

Assembly: Wisej.Framework (3.5.0.0)

Represents a collection of cells in a DataGridViewRow.

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

Constructors

Instance memberDataGridViewCellCollection(row)

Initializes a new instance of the DataGridViewCellCollection class.

NameTypeDescription
rowDataGridViewRowThe DataGridViewRow that owns the collection.

Properties

Instance memberItem(column)

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

Throws:

Instance memberItem(index)

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

Throws:

Instance memberItem(columnName)

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

Throws:

Methods

Instance memberAdd(cell)

Adds a cell to the collection.

ParameterTypeDescription
cellDataGridViewCellA DataGridViewCell to add to the collection.

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

Throws:

Instance memberAddRange(cells)

Adds an array of cells to the collection.

ParameterTypeDescription
cellsDataGridViewCell[]The array of DataGridViewCell objects to add to the collection.

Throws:

Instance memberAddRangeInternal(cells)

Adds an array of cells to the collection.

ParameterTypeDescription
cellsDataGridViewCell[]The array of DataGridViewCell objects to add to the collection.

Throws:

Instance memberClear()

Clears all cells from the collection.

Throws:

Instance memberContains(cell)

Determines whether the specified cell is contained in the collection.

ParameterTypeDescription
cellDataGridViewCellA DataGridViewCell to locate in the collection.

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

Instance memberCopyTo(array, index)

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

ParameterTypeDescription
arrayDataGridViewCell[]The destination array to which the contents will be copied.
indexInt32The index of the element in array at which to start copying.

Instance memberIndexOf(cell)

Returns the index of the specified cell.

ParameterTypeDescription
cellDataGridViewCellThe 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.

Instance memberInsert(index, cell)

Inserts a cell into the collection at the specified index.

ParameterTypeDescription
indexInt32The zero-based index at which to place cell .
cellDataGridViewCellThe DataGridViewCell to insert.

Throws:

Instance memberRemove(cell)

Removes the specified cell from the collection.

ParameterTypeDescription
cellDataGridViewCellThe DataGridViewCell to remove from the collection.

Throws:

Instance memberRemoveAt(index)

Removes the cell at the specified index.

ParameterTypeDescription
indexInt32The zero-based index of the DataGridViewCell to be removed.

Throws:

Events

Instance memberCollectionChanged

CollectionChangeEventHandler Fired when the collection changes.