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 DetailsView control.
Assembly: System.Web (in System.Web.dll)
<asp:DetailsView AutoGenerateRows="True|False" />
Property Value
Type: System::Booleantrue to display automatically generated bound row fields for each field in the data source; otherwise, false. The default is true.
Each data row in the DetailsView control is represented by a row field. When the 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 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 DetailsView control's advanced capabilities you must explicitly declare the row fields to include in the DetailsView control. For more information, see 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 AutoGenerateRows is stored in view state.
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