Back to Devexpress

TdxSpreadSheetTableView.InsertRows(Integer,Integer) Method

vcl-dxspreadsheetcore-dot-tdxspreadsheettableview-dot-insertrows-x28-system-dot-integer-system-dot-integer-x29.md

latest2.6 KB
Original Source

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

NameType
ARowInteger
ACountInteger

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.

delphi
dxSpreadSheet1.ActiveSheetAsTable.InsertRows(1, 1);
cpp
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

TdxSpreadSheetTableView.DeleteRows

TdxSpreadSheetTableView.InsertCells

TdxSpreadSheetTableView.InsertColumns

TdxSpreadSheetTableView Class

TdxSpreadSheetTableView Members

dxSpreadSheetCore Unit