System.Web.UI.WebControls.GridView.Rows Property

Gets a collection of System.Web.UI.WebControls.GridViewRow objects that represent the data rows in a System.Web.UI.WebControls.GridView control.

Syntax

[System.ComponentModel.Browsable(false)]
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public virtual GridViewRowCollection Rows { get; }

Value

Documentation for this section has not yet been entered.

Remarks

The GridView.Rows property (collection) is used to store the data rows in a System.Web.UI.WebControls.GridView control. The System.Web.UI.WebControls.GridView control automatically populates the GridView.Rows collection by creating a System.Web.UI.WebControls.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 GridViewRow.RowType property set to DataControlRowType.DataRow are stored in the GridView.Rows collection. The System.Web.UI.WebControls.GridViewRow objects that represent the header, footer, and pager rows are not included in the collection.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0