GridViewRowCollection Class
Assembly: System.Web (in system.web.dll)
The GridViewRowCollection class is used to store and manage a collection of GridViewRow objects in a GridView control. Each row in a GridView control is represented by a GridViewRow object. The GridView control stores all of its data rows in the Rows collection.
The GridViewRowCollection class supports several ways to access the items in the collection:
-
Use the Item indexer to directly retrieve a GridViewRow object at a specific zero-based index.
-
Use the GetEnumerator method to retrieve an enumerator that can be used to iterate through the collection.
-
Use the CopyTo method to copy the items in the collection into an System.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 Count property
- AspNetHostingPermission for operating in a hosted environment. Demand value: LinkDemand; Permission value: Minimal.
- AspNetHostingPermission for operating in a hosted environment. Demand value: InheritanceDemand; Permission value: Minimal.