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

Removes a specified number of rows starting from a designated row.

#Declaration

Delphi
procedure DeleteRows(AStartRow: Integer; ACount: Integer);

#Parameters

Name Type
AStartRow Integer
ACount Integer

#Remarks

Use this procedure to remove one or more rows starting from a row index passed as the AStartRow parameter. The ACount parameter specifies a number of deleted rows.

The following code example deletes entire rows, which were occupied by the selected cells. The image below displays the Table View worksheet before cell deletion.

dxSpreadSheet1.ActiveSheetAsTable.DeleteRows(1, 2);

The following image displays the Table View worksheet after the deletion of two rows.

If at least one deleted row intersects the array formula result area, the DeleteRows procedure raises the EdxSpreadSheetCannotChangePartOfArrayError exception.

To insert the specified number of rows, invoke the InsertRows method instead.

Note

Invoking the DeleteRows procedure has no effect if the CanDelete function returns False.

See Also