windowsforms-devexpress-dot-xtradatalayout-dot-datalayoutcontrol-3979198b.md
Gets or sets whether a layout is re-built each time a new value is assigned to the DataLayoutControl.DataSource property.
Namespace : DevExpress.XtraDataLayout
Assembly : DevExpress.XtraLayout.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
[DefaultValue(false)]
[DXCategory("Behavior")]
public bool AutoRetrieveFields { get; set; }
<DefaultValue(False)>
<DXCategory("Behavior")>
Public Property AutoRetrieveFields As Boolean
| Type | Default | Description |
|---|---|---|
| Boolean | false |
true if a layout is re-built each time a new value is assigned to the DataLayoutControl.DataSource property; otherwise, false.
|
If the DataLayoutControl.DataSource property is set at runtime, a layout is not automatically generated, since the AutoRetrieveFields property is set to false by default. To generate a layout, either set the AutoRetrieveFields property to true prior to changing the DataLayoutControl.DataSource property, or call the DataLayoutControl.RetrieveFields method after the DataLayoutControl.DataSource property is set.
See Also
Binding to Data Source in Code
Data Annotation Attributes - Building Layout from Business Object