DataControlBase.AutoPopulateColumns Property
OBSOLETE
Use the AutoGenerateColumns property instead
Gets or sets whether columns should be created automatically for all fields in a data source if the grid doesn’t contain any columns. This is a dependency property.
Namespace: DevExpress.Xpf.Grid
Assembly: DevExpress.Xpf.Grid.v26.1.Core.dll
NuGet Package: DevExpress.Wpf.Grid.Core
Declaration
[Obsolete("Use the AutoGenerateColumns property instead")]
[Browsable(false)]
public bool AutoPopulateColumns { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean | true to automatically create columns for all fields in a data source if the grid doesn’t contain any columns; otherwise, false. |
Remarks
If the AutoPopulateColumns property is set to true and the grid’s GridControl.Columns collection is empty, the DataControlBase.PopulateColumns method is automatically called after a grid has been bound to a data source. The DataControlBase.PopulateColumns method creates columns for all fields in a data source, and adds them to the GridControl.Columns collection.
To prevent grid columns from being automatically created, set the AutoPopulateColumns property to false.
To learn more, see Data Editing and Validation and Creating Columns and Binding Them to Data Properties.