GridControl.Columns Property
In This Article
Provides access to the grid's column collection.
Namespace: DevExpress.Xpf.Grid
Assembly: DevExpress.Xpf.Grid.v14.2.dll
#Declaration
[XtraSerializableProperty(true, true, true)]
[GridStoreAlwaysProperty]
public GridColumnCollection Columns { get; }
#Property Value
Type | Description |
---|---|
Grid |
A Grid |
#Remarks
The grid stores its columns within the Columns collection. This collection provides methods that allow you to add new and remove existing columns. Individual columns are represented by GridColumn objects, and can be accessed using indexed notation or by the field name (ColumnBase.FieldName).
To access only visible columns whose BaseColumn.Visible property is set to true, use a view's GridViewBase.VisibleColumns property.
To learn more, see Columns and Creating Columns and Binding Them to Data Fields.
See Also