Represents a collection of System.Web.UI.WebControls.GridViewRow objects in a System.Web.UI.WebControls.GridView control.
See Also: GridViewRowCollection Members
The System.Web.UI.WebControls.GridViewRowCollection class is used to store and manage a collection of System.Web.UI.WebControls.GridViewRow objects in a System.Web.UI.WebControls.GridView control. Each row in a System.Web.UI.WebControls.GridView control is represented by a System.Web.UI.WebControls.GridViewRow object. The System.Web.UI.WebControls.GridView control stores all of its data rows in the GridView.Rows collection.
The System.Web.UI.WebControls.GridViewRowCollection class supports several ways to access the items in the collection:
Use the GridViewRowCollection.Item(int) indexer to directly retrieve a System.Web.UI.WebControls.GridViewRow object at a specific zero-based index.
Use the GridViewRowCollection.GetEnumerator method to retrieve an enumerator that can be used to iterate through the collection.
Use the GridViewRowCollection.CopyTo(GridViewRow[], int) method to copy the items in the collection into an Array object, which can then be used to access the items in the collection.
To determine the total number of items in the collection, use the GridViewRowCollection.Count property