TdxSpreadSheetTableView.InsertColumns(string,Integer) Method
Inserts a specified number of uninitialized columns following the designated column.
Declaration
procedure InsertColumns(const AColumn: string; ACount: Integer); overload;
Parameters
Name | Type |
---|---|
AColumn | string |
ACount | Integer |
Remarks
Call this procedure to insert columns following a column whose zero-based index is passed as the AColumn parameter. The ACount parameter specifies the number of inserted columns.
Both uninitialized columns and column objects are shifted to the right to allocate space for inserted columns.
The following code example inserts one column following the first. The image below shows the Table View worksheet appearance before column insertion.
The following image shows the Table View worksheet after column insertion.
Invoking the InsertColumns procedure has no effect if the CanInsert function returns False.
Note
Since the InsertColumns procedure cannot create column objects, you may also need to invoke the CreateItem function of the Table View worksheet’s Columns collection in order to work with the inserted columns.