Skip to main content
A newer version of this page is available. .

DataControlBase.AutoGenerateColumns Property

Gets or sets whether columns should be created automatically for all fields in a data source. This is a dependency property.

Namespace: DevExpress.WinUI.Grid

Assembly: DevExpress.WinUI.Grid.v22.1.dll

NuGet Package: DevExpress.WinUI

Declaration

[DP(true, Handler = "OnAutoGenerateColumnsChanged")]
public bool AutoGenerateColumns { get; set; }

Property Value

Type Description
Boolean

true, to automatically create columns for all fields in a data source; otherwise, false.

Remarks

If the AutoGenerateColumns property is set to true, the GridControl creates columns for all fields in a data source and adds them to the DataControlBase.Columns collection.

Follow the steps below to manually add columns to the GridControl:

  1. Set the AutoGenerateColumns property to false.
  2. Add ColumnBase descendants to the DataControlBase.Columns collection.
  3. Specify the ColumnBase.FieldName property for each column.

WinUI Grid Get Started | Manual Columns

See Also