Skip to main content
Version: 3.5

DataGridViewRowCollection

Namespace: Wisej.Web

Assembly: Wisej.Framework (3.5.0.0)

A collection of DataGridViewRow objects.

public class DataGridViewRowCollection : IList, ICollection, IEnumerable, IList<DataGridViewRow>, ICollection<DataGridViewRow>, IEnumerable<DataGridViewRow>

Constructors

Instance memberDataGridViewRowCollection(dataGrid)

Initializes a new instance of the DataGridViewRowCollection class for the given DataGridView.

NameTypeDescription
dataGridDataGridViewThe DataGridView that created this collection.

Properties

Instance memberCount

Int32: Returns the number of rows in the collection.

Instance memberItem(index)

DataGridViewRow: Returns the DataGridViewRow at the specified index.

Throws:

Methods

Instance memberAdd()

Adds a new DataGridViewRow to the collection.

Returns: Int32. The index of the new DataGridViewRow.

Throws:

Instance memberAdd(values)

Adds a new DataGridViewRow to the collection, and populates the cells with the specified objects.

ParameterTypeDescription
valuesObject[]A variable number of objects that populate the cells of the new DataGridViewRow.

Returns: Int32. The index of the new DataGridViewRow.

Throws:

Instance memberAdd(row)

Adds the specified DataGridViewRow to the collection.

ParameterTypeDescription
rowDataGridViewRowThe DataGridViewRow to add to the DataGridViewRowCollection.

Returns: Int32. The index of the new DataGridViewRow.

Throws:

Instance memberAdd(count)

Adds the specified number of new rows to the collection.

ParameterTypeDescription
countInt32The number of rows to add to the DataGridViewRowCollection.

Returns: Int32. The index of the last row that was added.

Throws:

Instance memberAddCopies(rowIndex, count)

Adds the specified number of rows to the collection based on the row at the specified index.

ParameterTypeDescription
rowIndexInt32The index of the row on which to base the new rows.
countInt32The number of rows to add to the DataGridViewRowCollection.

Returns: Int32. The index of the last row that was added.

Throws:

Instance memberAddCopy(rowIndex)

Adds a DataGridViewRow row based on the DataGridViewRow at the specified index.

ParameterTypeDescription
rowIndexInt32The index of the row on which to base the new row.

Returns: Int32. The index of the new DataGridViewRow.

Throws:

Instance memberAddRange(newRows)

Adds the specified DataGridViewRow objects to the collection.

ParameterTypeDescription
newRowsDataGridViewRow[]An array of DataGridViewRow objects to be added to the DataGridViewRowCollection.

Throws:

Instance memberClear()

Clears the collection.

Throws:

Instance memberContains(row)

Determines whether the specified DataGridViewRow is in the collection.

ParameterTypeDescription
rowDataGridViewRowThe DataGridViewRow to locate in the DataGridViewRowCollection.

Returns: Boolean. true if the DataGridViewRow is in the DataGridViewRowCollection; otherwise, false.

Instance memberCopyTo(array, index)

Copies the items from the collection into the specified DataGridViewRow array, starting at the specified index.

ParameterTypeDescription
arrayDataGridViewRow[]A DataGridViewRow array that is the destination of the items copied from the DataGridViewRowCollection.
indexInt32The zero-based index in array at which copying begins.

Throws:

Instance memberGetFirstRow(includeFilter, excludeFilter)

Returns the first DataGridViewRow that matches the specified includeFilter and excludeFilter .

ParameterTypeDescription
includeFilter optionalDataGridViewElementStatesA bitwise combination of DataGridViewElementStates values.
excludeFilter optionalDataGridViewElementStatesA bitwise combination of DataGridViewElementStates values.

Returns: DataGridViewRow. The first DataGridViewRow that matches the specified filters; or null if no row is found.

Throws:

Instance memberGetFirstRowIndex(includeFilter, excludeFilter)

Returns the index of the first DataGridViewRow that matches the specified includeFilter and excludeFilter .

ParameterTypeDescription
includeFilter optionalDataGridViewElementStatesA bitwise combination of DataGridViewElementStates values.
excludeFilter optionalDataGridViewElementStatesA bitwise combination of DataGridViewElementStates values.

Returns: Int32. The index of the first DataGridViewRow that matches the specified filters; or -1 if no row is found.

Throws:

Instance memberGetLastRow(includeFilter, excludeFilter)

Returns the last DataGridViewRow that matches the includeFilter and excludeFilter .

ParameterTypeDescription
includeFilter optionalDataGridViewElementStatesA bitwise combination of DataGridViewElementStates values.
excludeFilter optionalDataGridViewElementStatesA bitwise combination of DataGridViewElementStates values.

Returns: DataGridViewRow. The last DataGridViewRow that matches the specified filter; or null if no row is found.

Throws:

Instance memberGetLastRowIndex(includeFilter, excludeFilter)

Returns the index of the last DataGridViewRow that matches the includeFilter and excludeFilter .

ParameterTypeDescription
includeFilter optionalDataGridViewElementStatesA bitwise combination of DataGridViewElementStates values.
excludeFilter optionalDataGridViewElementStatesA bitwise combination of DataGridViewElementStates values.

Returns: Int32. The index of the last DataGridViewRow that matches the specified filter; or -1 if no row is found.

Throws:

Instance memberGetNextRow(startRow, includeFilter, excludeFilter)

Returns the next DataGridViewRow after startRow that matches the includeFilter and excludeFilter .

ParameterTypeDescription
startRowDataGridViewRowThe row where the method should begin to look for the next DataGridViewRow.
includeFilter optionalDataGridViewElementStatesA bitwise combination of DataGridViewElementStates values.
excludeFilter optionalDataGridViewElementStatesA bitwise combination of DataGridViewElementStates values.

Returns: DataGridViewRow. The next DataGridViewRow that matches the filters; or null if no row is found after startRow .

Throws:

Instance memberGetNextRow(startIndex, includeFilter, excludeFilter)

Returns the next DataGridViewRow after startIndex that matches the includeFilter and excludeFilter .

ParameterTypeDescription
startIndexInt32The index of the row where the method should begin to look for the next DataGridViewRow.
includeFilter optionalDataGridViewElementStatesA bitwise combination of DataGridViewElementStates values.
excludeFilter optionalDataGridViewElementStatesA bitwise combination of DataGridViewElementStates values.

Returns: DataGridViewRow. The next DataGridViewRow that matches the filters; or null if no row is found after startIndex .

Throws:

Instance memberGetNextRowIndex(startRow, includeFilter, excludeFilter)

Returns the index of the next DataGridViewRow after startRow that matches the includeFilter and excludeFilter .

ParameterTypeDescription
startRowDataGridViewRowThe row where the method should begin to look for the next DataGridViewRow.
includeFilter optionalDataGridViewElementStatesA bitwise combination of DataGridViewElementStates values.
excludeFilter optionalDataGridViewElementStatesA bitwise combination of DataGridViewElementStates values.

Returns: Int32. The index of the next DataGridViewRow that matches the filters; or -1 if no row is found after startRow .

Throws:

Instance memberGetNextRowIndex(startIndex, includeFilter, excludeFilter)

Returns the index of the next DataGridViewRow after startIndex that matches the includeFilter and excludeFilter .

ParameterTypeDescription
startIndexInt32The index of the row where the method should begin to look for the next DataGridViewRow.
includeFilter optionalDataGridViewElementStatesA bitwise combination of DataGridViewElementStates values.
excludeFilter optionalDataGridViewElementStatesA bitwise combination of DataGridViewElementStates values.

Returns: Int32. The index of the next DataGridViewRow that matches the filters; or -1 if no row is found after startIndex .

Throws:

Instance memberGetPreviousRow(startRow, includeFilter, excludeFilter)

Returns the previous DataGridViewRow before startRow that matches the includeFilter and excludeFilter .

ParameterTypeDescription
startRowDataGridViewRowThe row where the method should begin to look for the previous DataGridViewRow.
includeFilter optionalDataGridViewElementStatesA bitwise combination of DataGridViewElementStates values.
excludeFilter optionalDataGridViewElementStatesA bitwise combination of DataGridViewElementStates values.

Returns: DataGridViewRow. The previous DataGridViewRow that matches the filters; or null if no row is found before startRow .

Throws:

Instance memberGetPreviousRow(startIndex, includeFilter, excludeFilter)

Returns the previous DataGridViewRow before startIndex that matches the includeFilter and excludeFilter .

ParameterTypeDescription
startIndexInt32The index of the row where the method should begin to look for the previous DataGridViewRow.
includeFilter optionalDataGridViewElementStatesA bitwise combination of DataGridViewElementStates values.
excludeFilter optionalDataGridViewElementStatesA bitwise combination of DataGridViewElementStates values.

Returns: DataGridViewRow. The previous DataGridViewRow that matches the filters; or null if no row is found before startIndex .

Throws:

Instance memberGetPreviousRowIndex(startRow, includeFilter, excludeFilter)

Returns the index of the previous DataGridViewRow before startRow that matches the includeFilter and excludeFilter .

ParameterTypeDescription
startRowDataGridViewRowThe row where the method should begin to look for the previous DataGridViewRow.
includeFilter optionalDataGridViewElementStatesA bitwise combination of DataGridViewElementStates values.
excludeFilter optionalDataGridViewElementStatesA bitwise combination of DataGridViewElementStates values.

Returns: Int32. The index of previous DataGridViewRow that matches the filters; or -1 if no row is found before startRow .

Throws:

Instance memberGetPreviousRowIndex(startIndex, includeFilter, excludeFilter)

Returns the index of the previous DataGridViewRow before startIndex that matches the includeFilter and excludeFilter .

ParameterTypeDescription
startIndexInt32The index of the row where the method should begin to look for the previous DataGridViewRow.
includeFilter optionalDataGridViewElementStatesA bitwise combination of DataGridViewElementStates values.
excludeFilter optionalDataGridViewElementStatesA bitwise combination of DataGridViewElementStates values.

Returns: Int32. The index of the previous DataGridViewRow that matches the filters; or -1 if no row is found before startIndex .

Throws:

Instance memberGetRowCount(includeFilter)

Returns the number of rows that match the includeFilter .

ParameterTypeDescription
includeFilterDataGridViewElementStatesA combination of the DataGridViewElementStates values for inclusion.

Returns: Int32. The number of rows that match the includeFilter .

Throws:

Instance memberGetRowsHeight(includeFilter)

Returns the cumulative height of the DataGridViewRow objects that match the includeFilter .

ParameterTypeDescription
includeFilterDataGridViewElementStatesA bitwise combination of DataGridViewElementStates values.

Returns: Int32. The cumulative height of DataGridViewRow objects that match the includeFilter .

Throws:

Instance memberGetRowState(rowIndex)

Returns the state of the DataGridViewRow at the specified index.

ParameterTypeDescription
rowIndexInt32The index of the row.

Returns: DataGridViewElementStates. A combination of DataGridViewElementStates values indicating the state of the row.

Throws:

Instance memberIndexOf(row)

Returns the index of the given DataGridViewRow in the collection.

ParameterTypeDescription
rowDataGridViewRowThe DataGridViewRow to return the index of.

Returns: Int32. The index of the given DataGridViewRow.

Instance memberInsert(index)

Inserts a DataGridViewRow into the collection at the specified position.

ParameterTypeDescription
indexInt32The position at which to insert the DataGridViewRow.

Throws:

Instance memberInsert(index, values)

Inserts a DataGridViewRow into the collection at the specified position, and populates the cells with the specified objects.

ParameterTypeDescription
indexInt32The position at which to insert the DataGridViewRow.
valuesObject[]A variable number of objects that populate the cells of the new DataGridViewRow.

Throws:

Instance memberInsert(index, row)

Inserts the specified DataGridViewRow into the collection.

ParameterTypeDescription
indexInt32The position at which to insert the row.
rowDataGridViewRowThe DataGridViewRow to insert into the DataGridViewRowCollection.

Throws:

Instance memberInsert(index, count)

Inserts the specified number of rows into the collection at the specified location.

ParameterTypeDescription
indexInt32The position at which to insert the rows.
countInt32The number of rows to insert into the DataGridViewRowCollection.

Throws:

Instance memberInsertCopies(indexSource, indexDestination, count)

Inserts rows into the collection at the specified position.

ParameterTypeDescription
indexSourceInt32The index of the DataGridViewRow on which to base the new rows.
indexDestinationInt32The position at which to insert the rows.
countInt32The number of DataGridViewRow objects to add to the DataGridViewRowCollection.

Throws:

Instance memberInsertCopy(indexSource, indexDestination)

Inserts a new DataGridViewRow into the collection at the specified indexDestination , based on the DataGridViewRow at indexSource .

ParameterTypeDescription
indexSourceInt32The index of the DataGridViewRow on which to base the new DataGridViewRow.
indexDestinationInt32The position at which to insert the row.

Throws:

Instance memberInsertRange(index, newRows)

Inserts the DataGridViewRow objects into the collection at the specified position.

ParameterTypeDescription
indexInt32The position at which to insert the rows.
newRowsDataGridViewRow[]An array of DataGridViewRow objects to add to the DataGridViewRowCollection.

Throws:

Instance memberRemove(row)

Removes the row from the collection.

ParameterTypeDescription
rowDataGridViewRowThe row to remove from the DataGridViewRowCollection.

Throws:

Instance memberRemoveAt(index)

Removes the DataGridViewRow at the specified position from the collection.

ParameterTypeDescription
indexInt32The position of the row to remove.

Throws:

Events

Instance memberCollectionChanged

CollectionChangeEventHandler Fired when the collection changes.