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.InsertRows(Integer,Integer) Method

Inserts a specified number of uninitialized rows following the designated row.

#Declaration

Delphi
procedure InsertRows(ARow: Integer; ACount: Integer);

#Parameters

Name Type
ARow Integer
ACount Integer

#Remarks

Call this procedure to insert rows below a row whose zero-based index is passed as the ARow parameter. The ACount parameter specifies the number of inserted rows.

Both uninitialized rows and row objects are shifted down to allocate space for inserted rows.

The following code example inserts one row following the first. The image below shows the Table View worksheet before row insertion.

dxSpreadSheet1.ActiveSheetAsTable.InsertRows(1, 1);

The following image shows the Table View worksheet after row insertion.

Invoking the InsertRows procedure has no effect if the CanInsert function returns False.

Note

Since the InsertRows procedure cannot create row objects, you may also need to invoke the CreateItem function of the Table View worksheet’s Rows collection in order to work with the inserted rows.

See Also