Skip to main content

TcxGridDBTableView.Columns Property

Provides indexed access to the collection of the View’s columns.

Declaration

property Columns[Index: Integer]: TcxGridDBColumn read; write;

Property Value

Type
TcxGridDBColumn

Remarks

Use the Columns property to access the collection of columns. Each column consists of an instance of the TcxGridDBColumn class. This class is a TcxGridColumn class descendant and it redefines the Item.DataBinding property to work with the TDataSet and its descendants. Each column also provides properties for defining sets of options & styles controlling the column’s look & feel, an editor for its values, etc.

The following code shows how to use the Columns property to access all View columns and to change their captions:

for I := 0 to OrdersView.ColumnCount - 1 do
  OrdersView.Columns[I].Caption := 'Column' + IntToStr(I + 1);
See Also