Skip to main content

DataControlBase.PopulateColumns() Method

In This Article

Creates columns for all fields in a bound data source.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v14.2.Core.dll

#Declaration

public void PopulateColumns()

#Remarks

The PopulateColumns method clears the grid's GridControl.Columns collection, and re-populates it with columns that correspond to all fields in a data source.

This method is automatically called after the grid has been bound to a data source if its DataControlBase.AutoPopulateColumns property is set to true and the GridControl.Columns collection is empty.

Calling the DataControlBase.PopulateColumns method raises the DataControlBase.ColumnsPopulated event.

To learn more, see Creating Columns and Binding Them to Data Fields.

See Also