Export (0) Print
Expand All

DetailsView.Rows Property

Note: This property is new in the .NET Framework version 2.0.

Gets a collection of DetailsViewRow objects that represent the data rows in a DetailsView control.

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in system.web.dll)

public:
virtual property DetailsViewRowCollection^ Rows {
	DetailsViewRowCollection^ get ();
}
/** @property */
public DetailsViewRowCollection get_Rows ()

public function get Rows () : DetailsViewRowCollection

Property Value

A DetailsViewRowCollection that contains all the data rows in a DetailsView control.

The Rows property (collection) is used to store the data rows in a DetailsView control. The DetailsView control automatically populates the Rows collection by creating a DetailsViewRow object for each record in the data source and then adding the 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.

NoteNote

Only data rows are stored in the Rows collection. The DetailsViewRow objects that represent the header, footer, and pager rows are not included in the collection.

The following code example demonstrates how to use the Rows property to access a data row in a DetailsView control. The data row is used to retrieve the value of a field from the DetailsView control.

No code example is currently available or this language may not be supported.

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

Community Additions

ADD
Show:
© 2014 Microsoft