windowsforms-devexpress-dot-xtratreelist-dot-treelistoptionsbehavior-ae1bbaa2.md
Gets or sets whether columns should be automatically created for all the fields in the underlying data source when the Tree List doesn’t contain any columns.
Namespace : DevExpress.XtraTreeList
Assembly : DevExpress.XtraTreeList.v25.2.dll
NuGet Packages : DevExpress.Win.Navigation, DevExpress.Win.TreeList
[DefaultValue(true)]
[XtraSerializableProperty]
public virtual bool AutoPopulateColumns { get; set; }
<DefaultValue(True)>
<XtraSerializableProperty>
Public Overridable Property AutoPopulateColumns As Boolean
| Type | Default | Description |
|---|---|---|
| Boolean | true |
true if the columns are created automatically when the Tree List doesn’t contain any columns; otherwise, false.
|
You can access this nested property as listed below:
| Object Type | Path to AutoPopulateColumns |
|---|---|
| TreeList |
.OptionsBehavior .AutoPopulateColumns
|
This property determines whether the TreeList.PopulateColumns method is called automatically when a data source is assigned to the Tree List which doesn’t contain any columns. The TreeList.PopulateColumns method creates TreeListColumn 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. In this case columns should be manually added to the TreeList.Columns collection.
See Also