Represents a collection of System.Web.UI.WebControls.DetailsViewRow objects in a System.Web.UI.WebControls.DetailsView control.
See Also: DetailsViewRowCollection Members
The System.Web.UI.WebControls.DetailsViewRowCollection class is used to store and manage a collection of System.Web.UI.WebControls.DetailsViewRow objects in a System.Web.UI.WebControls.DetailsView control. Each row in a System.Web.UI.WebControls.DetailsView control is represented by a System.Web.UI.WebControls.DetailsViewRow object. The System.Web.UI.WebControls.DetailsView control uses the System.Web.UI.WebControls.DetailsViewRowCollection class for its DetailsView.Rows property.
The DetailsView.Rows property contains only the data rows. To access the header row, footer row, top pager row, and bottom pager row, use the DetailsView.HeaderRow, DetailsView.FooterRow, DetailsView.TopPagerRow, and DetailsView.BottomPagerRow properties, respectively.
The System.Web.UI.WebControls.DetailsViewRowCollection class supports several ways to access the items in the collection:
Use the DetailsViewRowCollection.Item(int) indexer to directly retrieve a System.Web.UI.WebControls.DetailsViewRow object from the collection at a specific zero-based index.
Use the DetailsViewRowCollection.GetEnumerator method to retrieve an enumerator that can be used to iterate through the collection.
Use the DetailsViewRowCollection.CopyTo(DetailsViewRow[], int) 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 DetailsViewRowCollection.Count property.