DataGridViewRowCollection Class

Represents a collection of DataGridViewRow objects in a DataGridView control.   

Namespace: elsystem.windows.forms

Properties

  Additional properties, methods, and events are described in the classes listed under Inheritance Hierarchy (see below).

  Name Type Description
Public property Count int Gets the number of rows in the collection. Use of CountTotal is preferred (see below).
Public property CountTotal int Gets the total number of rows in the collection. The count will include the “blank” row if DataGridView is set to allow users to add rows. Since this property includes the blank row in the number of rows when the user is allowed to add rows, the use of CountTotal is preferred to the use of the Count property.
Public property Items(index) int Gets the DataGridViewRow at the specified index.
Methods
  Name Description
Public property Add(row) Adds a row to the collection.
Public property Add(values) Adds a row to the collection and places values into the cells.
Public property At(int) The row indexer.
Public property Clear Clears the collection.
Public property Insert(index, row) Inserts a row into the collection at the specified index position, and populates the cells with the specified DataGridViewRow objects.
Public property Remove(row) Removes the named row from the collection.
Public property RemoveAt(index) Removes the row at the specified index position from the collection.
Inheritance Hierarchy

elsystem.Object

elsystem.DotNetObject

elsystem.windows.forms.DataGridViewRowCollection