A newer version of this page is available. Switch to the current version.

ColumnView.Columns Property

Provides access to the collection of columns available for display within the View.

Namespace: DevExpress.XtraGrid.Views.Base

Assembly: DevExpress.XtraGrid.v19.1.dll


[XtraSerializableProperty(XtraSerializationVisibility.Collection, true, true, true, 0, XtraSerializationFlags.DefaultValue)]
public virtual GridColumnCollection Columns { get; }

Property Value

Type Description

A GridColumnCollection object representing a collection of available columns within the current View.


The property stores all columns available for display in the current View. It allows you to add and delete columns using appropriate methods. You can also access individual columns using indexer notation or the bound field name as parameters. The addition of a column to the Columns collection does not make that column visible.

In the CardView and LayoutView, columns are displayed as card fields. In the GridView and its descendants, they are displayed as regular columns. In the WinExplorerView, which displays a list of items, columns correspond to item fields.

Each column in the GridView, CardView and WinExplorerView Views is a GridColumn object. In the AdvBandedGridView and BandedGridView Views, columns are BandedGridColumn objects. In the LayoutView, columns are LayoutViewColumn objects.

To learn how to make columns visible, see the Columns topic. All columns currently displayed within the View can be accessed via the ColumnView.VisibleColumns property.

To display columns from the Columns collection within the WinExplorerView, assign them to the predefined WinExplorerView columns from the WinExplorerView.ColumnSet property.

For more information on columns, see the Columns topic.


The following example demonstrates how to create a column within a View, and assign a specific editor to it.

    using DevExpress.XtraGrid.Views.BandedGrid;
    using DevExpress.XtraEditors.Repository;
    BandedGridColumn col = advBandedGridView1.Columns.Add("Country") as BandedGridColumn;
    col.Visible = true;
    RepositoryItemLookUpEdit columnEditor = new RepositoryItemLookUpEdit();
    //customizing the column editor
    col.ColumnEdit = columnEditor;
See Also