System.Web.UI.WebControls.DetailsView.AutoGenerateRows Property

Gets or sets a value indicating whether row fields for each field in the data source are automatically generated and displayed in a System.Web.UI.WebControls.DetailsView control.

Syntax

[System.ComponentModel.DefaultValue(true)]
public virtual bool AutoGenerateRows { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

Each data row in the System.Web.UI.WebControls.DetailsView control is represented by a row field. When the DetailsView.AutoGenerateRows property is set to true, an automatically generated bound row field is created for each field in the data source. Each field is then displayed in a row as text, in the order in which each field appears in the data source.

Note:

Automatically generated bound row fields are not added to the DetailsView.Fields collection.

Automatically generating the rows provides a quick and easy way to display every field in the record. However, to make use of the System.Web.UI.WebControls.DetailsView control's advanced capabilities you must explicitly declare the row fields to include in the System.Web.UI.WebControls.DetailsView control. For more information, see DetailsView.Fields.

Note:

Explicitly declared row fields can be used in combination with automatically generated row fields. When both are used, explicitly declared row fields are rendered first, followed by the automatically generated row fields.

The value of DetailsView.AutoGenerateRows is stored in view state.

Requirements

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