DetailsViewRowCollection Class
Assembly: System.Web (in system.web.dll)
The DetailsViewRowCollection class is used to store and manage a collection of DetailsViewRow objects in a DetailsView control. Each row in a DetailsView control is represented by a DetailsViewRow object. The DetailsView control uses the DetailsViewRowCollection class for its Rows property.
Note: |
|---|
| The Rows property contains only the data rows. To access the header row, footer row, top pager row, and bottom pager row, use the HeaderRow, FooterRow, TopPagerRow, and BottomPagerRow properties, respectively. |
The DetailsViewRowCollection class supports several ways to access the items in the collection:
-
Use the Item indexer to directly retrieve a DetailsViewRow object from the collection 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 array, 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.
Note: