GridView::Rows Property
Gets a collection of GridViewRow objects that represent the data rows in a GridView control.
Assembly: System.Web (in System.Web.dll)
[BrowsableAttribute(false)] public: virtual property GridViewRowCollection^ Rows { GridViewRowCollection^ get (); }
Property Value
Type: System.Web.UI.WebControls::GridViewRowCollectionA GridViewRowCollection that contains all the data rows in a GridView control.
The Rows property (collection) is used to store the data rows in a GridView control. The GridView control automatically populates the Rows collection by creating a GridViewRow object for each record in the data source and then adding each object to the collection. This property is commonly used to access a specific row in the control or to iterate though the entire collection of rows.
Note |
|---|
Only rows with their RowType property set to DataControlRowType.DataRow are stored in the Rows collection. The GridViewRow objects that represent the header, footer, and pager rows are not included in the collection. |
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Note