Skip to main content

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.v23.2.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.

The following code snippets (auto-collected from DevExpress Examples) contain references to the AutoPopulateColumns property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also