property Columns: TNxColumns
Description
Property for accessing additional column properties and methods.
The class has the following properties
Properties and methods |
Description |
procedure Add (Source: TNxCustomColumn): TNxCustomColumn |
Adds a new column with the specified class. |
procedure Clear |
Destroys all columns. |
property Count: Integer |
Returns the number of columns. |
procedure Delete (index: integer) |
Deletes the column with the specified index, the column numbering starts from 0. |
function InsertCheckBoxColumn(Pos: Integer): TNxCustomColumn |
Inserting a column with a CheckBox (TNxCheckBoxColumn) in the specified position, column numbering starts from 0. |
function InsertGraphicColumn(Pos: Integer): TNxCustomColumn |
Inserting a graphical column (TNxGraphicColumn) in the specified position, the column numbering starts from 0. |
function InsertTreeColumn(Pos: Integer): TNxCustomColumn |
Inserting a tree column (TNxTreeColumn) in the specified position, the column numbering starts from 0. |
property LastAdded: TNxCustomColumn |
Returns a reference to the last added column. |
Examples
// As a rule, the creation of additional columns should happen in the event of the OnChange component
// adding a column of the specified class, available classes:
// TNxTextColumn, TNxNumberColumn, TNxDateColumn, TNxTimeColumn, TNxCheckBoxColumn, TNxListColumn, TNxGraphicColumn, TNxTreeColumn
try
Form1.TableGrid1.Columns.Add(TNxTextColumn);
except
end;
Form1.TableGrid1.Columns.LastAdded.Color := clWhite;
// Inserting a column with a CheckBox (TNxCheckBoxColumn) at the specified position, column numbering starts from 0.
Form1.TableGrid1.Columns.InsertCheckBoxColumn(0);