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

GridColumnCollection.Add() Method

Creates a new hidden column and adds it to the end of the collection.

Namespace: DevExpress.XtraGrid.Columns

Assembly: DevExpress.XtraGrid.v21.2.dll

NuGet Packages: DevExpress.Win.Design, DevExpress.Win.Grid

Declaration

public virtual GridColumn Add()

Returns

Type Description
GridColumn

A GridColumn object representing the new column.

Remarks

Use the Add method to add a new column with default settings to the end of the collection. Note that the new column has no caption, is not bound to any data source field and has other settings cleared. So, you need to customize the method’s return object to provide proper column settings.

To make the column visible, use the GridColumn.VisibleIndex property.

Please refer to the Columns topic for details.

See Also