Skip to main content

TdxSpreadSheetTableView.InsertRows(Integer,Integer) Method

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

Declaration

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