Skip to main content

TcxCustomGridColumn Class

The base class for columns in Table and Banded Table grid Views.

Declaration

TcxCustomGridColumn = class(
    TcxCustomGridTableItem
)

Remarks

The TcxCustomGridColumn class implements core functionality common to all Table and Banded Table grid Views in all supported data access modes. A column displays data of the same type in a table. In bound and server data access modes, a column corresponds to an individual dataset field.

VCL Data Grid: A Table View Column Example

A column can use any editor from the ExpressEditors Library as an in-place editor for cell edit operations. To switch between available editors, you can use the PropertiesClassName or PropertiesClass property. Use the Properties property to configure the active in-place editor.

Main API Members

The list below outlines key members of the TcxCustomGridColumn class that allow you to configure columns in Table and Banded Table grid Views.

Example: Create an Unbound Column

The following code example creates an unbound Table View column (TcxGridColumn), assigns a spin in-place editor to it, and limits the input value range.

uses cxSpinEdit;
// ...
var
  AColumn: TcxGridColumn;
  ASpinEditProperties: TcxSpinEditProperties;
begin
  AColumn := cxGrid1TableView1.CreateColumn;  // Creates a new unbound column
  AColumn.DataBinding.ValueType := 'Integer'; // Changes the column value type to "Integer"
  AColumn.PropertiesClass := TcxSpinEditProperties; // Assigns an in-place spin editor
  ASpinEditProperties := AColumn.Properties as TcxSpinEditProperties;
  ASpinEditProperties.MinValue := 0;  // Sets the minimum edit value
  ASpinEditProperties.MaxValue := 20; // Sets the maximum edit value
  ASpinEditProperties.Circular := True; // Loops value changes within the defined range
end;

Terminal TcxCustomGridColumn Class Descendants

Do not use the TcxCustomGridColumn class directly. Use the following descendants instead:

TcxGridColumn
An item (column) in a Table View.
TcxGridBandedColumn
A column within a Banded Table View.
TcxGridDBColumn
A column in a data-aware grid Table View.
TcxGridDBBandedColumn
A banded column in a data-aware Banded Table View (TcxGridDBBandedTableView).
TcxGridServerModeColumn
A column in a Server Mode Table View.
TcxGridServerModeBandedColumn
A column within a Banded Table View with support for server mode.
See Also