GridControl is a data-aware control designed to display tabular information from the bound data source. Data sources present this information using data fields and records.
In GridControl, data fields are represented as columns, and records are displayed as rows. So, to display data, a grid should contain columns bound to fields of the underlying data source. In addition to columns bound to data fields, a grid can include unbound columns to display data values calculated according to a formula based on values of other columns.
Grid columns are stored in the GridControl.Columns collection. An individual column is specified by a GridColumn class descendant that corresponds to the type of data displayed in this column. The following column types are supported.
A grid column to display and edit text values.
A grid column to display and edit numeric values.
A grid column to display and edit date values.
A grid column to display Boolean values and select between two states.
A column type that allows you to display images.
A grid column allowing an end-user to edit a cell value by selecting an item from the predefined set.
A column type that allows you to define a custom template for column cells.
Any column object provides a set of properties to adjust column settings (for example, to set the data display format - GridColumn.DisplayFormat, column width - GridColumn.Width, column visibility - GridColumn.IsVisible, column content alignment - GridColumn.ContentAlignment, etc.), as well as to manage and shape grid data (for example, to sort - GridColumn.SortOrder, GridColumn.SortIndex, GridColumn.SortMode, group - GridColumn.IsGrouped, GridColumn.GroupInterval, or filter data by column values - GridColumn.AutoFilterCondition, GridColumn.ColumnFilterMode, GridColumn.ImmediateUpdateAutoFilter, etc.).
Each column consists of the following elements.
A column header that displays the column caption and identifies the column for end-users. By default, a friendly caption is generated for a column based on its GridColumn.FieldName property. Friendly captions are generated by adding SPACE characters between parts of the field name starting with uppercase letters. For example, if the field name is "CustomerName", the display caption will be "Customer Name". If you need to replace the automatically created column caption with you own text, assign the corresponding string to the GridColumn.Caption property. To obtain a column caption as it is displayed in a column header, use the GridColumn.ActualCaption property.
To hide column headers, set the GridControl.ColumnHeadersVisibility property to false.
By default, an end-user can manage grid columns in the following ways.