Skip to main content

TcxGridDBBandedTableView.CreateColumn Method

Creates a column and adds it to the Columns collection of the data-aware Banded Table View, returning a pointer to the column created.

Declaration

function CreateColumn: TcxGridDBBandedColumn;

Returns

Type
TcxGridDBBandedColumn

Remarks

Use the CreateColumn method to create a column and add it to the View column collection. This collection can be accessed via the Columns property. After a column is created a user can specify its settings: connection to a data field, behavior options and styles, position within a band, etc.

The following code shows how to use the CreateColumn method:

//...
with btvItems.CreateColumn do
begin
  Caption := 'Description';
  Name := 'btvItemsDescription';
  DataBinding.FieldName := 'DESCRIPTION';
  PropertiesClass := TcxMemoProperties;
  Position.BandIndex := 1;
  Position.RowIndex := 1;
  Visible := True;
end;
...
See Also