Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TcxGridDBTableView.Columns Property

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

#Declaration

Delphi
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