ColumnViewOptionsBehavior.AutoPopulateColumns Property

Gets or sets whether columns should be created automatically for all fields in the underlying data source when the View doesn't contain any columns. When bound to a business object, the grid does not generate columns for properties of collection types.

Namespace: DevExpress.XtraGrid.Views.Base

Assembly: DevExpress.XtraGrid.v20.1.dll

Declaration

[DefaultValue(true)]
[XtraSerializableProperty]
public virtual bool AutoPopulateColumns { get; set; }
<DefaultValue(True)>
<XtraSerializableProperty>
Public Overridable Property AutoPopulateColumns As Boolean

Property Value

Type Default Description
Boolean

true

true, if the columns are created automatically when the View doesn't contain any columns; otherwise, false.

Property Paths

You can access this nested property as listed below:

Show 15 property paths
Object Type Path to AutoPopulateColumns
AdvBandedGridView
.OptionsBehavior.AutoPopulateColumns
AdvBandedGridView
.OptionsBehavior.AutoPopulateColumns
BandedGridView
.OptionsBehavior.AutoPopulateColumns
BandedGridView
.OptionsBehavior.AutoPopulateColumns
ColumnView
.OptionsBehavior.AutoPopulateColumns
CardView
.OptionsBehavior.AutoPopulateColumns
CardView
.OptionsBehavior.AutoPopulateColumns
GridView
.OptionsBehavior.AutoPopulateColumns
GridView
.OptionsBehavior.AutoPopulateColumns
LayoutView
.OptionsBehavior.AutoPopulateColumns
LayoutView
.OptionsBehavior.AutoPopulateColumns
TileView
.OptionsBehavior.AutoPopulateColumns
TileView
.OptionsBehavior.AutoPopulateColumns
WinExplorerView
.OptionsBehavior.AutoPopulateColumns
WinExplorerView
.OptionsBehavior.AutoPopulateColumns

Remarks

This property determines whether the BaseView.PopulateColumns method is called automatically when a data source is assigned to a View which doesn't contain any columns. The BaseView.PopulateColumns method creates GridColumn objects for all the fields in the underlying data source and make these columns visible.

Set the AutoPopulateColumns property to false to prevent columns from being automatically created.

NOTE

A business object bound to a Grid Control may contain properties of collection types (e.g., of the List<> type). These properties instruct the Grid to enable master-detail mode (see Working with Master-Detail Relationships in Code). Columns corresponding to collection properties are not created in a master View.

See Also