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

TdxSpreadSheetTableView.InsertColumns(string,Integer) Method

Inserts a specified number of uninitialized columns following the designated column.

#Declaration

Delphi
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.

dxSpreadSheet1.ActiveSheetAsTable.InsertColumns(1, 1);

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.

See Also