GridColumn Class
Represents an individual column in Grid Views and Card Views.
Namespace: DevExpress.XtraGrid.Columns
Assembly: DevExpress.XtraGrid.v18.2.dll
Declaration
public class GridColumn :
Component,
IAppearanceOwner,
IXtraSerializableLayoutEx,
ISupportLookAndFeel,
IDataColumnInfoProvider,
ISupportDXSkinColorsEx,
ISupportDXSkinColors
Related API Members
The following members return GridColumn objects:
Remarks
GridColumn objects represent columns and card fields in Grid Views and Card Views respectively. Such objects are used to display data from an individual data field. The bound data field is specified by the GridColumn.FieldName property. Settings provided by the GridColumn class also allow you to control how column data is displayed and edited, column header contents, the column’s position and visibility, etc. Note that some of the settings provided are in effect only for columns displayed in Grid Views. For instance, the GridColumn.GroupIndex and GridColumn.SummaryItem properties are in effect for Grid View columns only, as Card Views do not support the grouping and summary features.
You can access a View’s column collection using the ColumnView.Columns property. This property returns an object whose indexer can be used to access individual GridColumn objects. Note also that column objects are Component descendants. This enables you to access columns in code directly by their names.
You don’t need to create column objects manually using the GridColumn
class constructor. Columns can be created using methods of the owning column collection (GridColumnCollection class) or by using the ColumnView.PopulateColumns method of the required View.
For additional information regarding columns, refer to the Columns article.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the GridColumn class.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.