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

TdxSpreadSheetTableViewSelection.SelectRows(Integer,Integer,TShiftState) Method

Selects a single row or a range of within the Table View worksheet.

#Declaration

Delphi
procedure SelectRows(AStartRow: Integer; AFinishRow: Integer; AShift: TShiftState = []);

#Parameters

Name Type
AStartRow Integer
AFinishRow Integer
AShift TShiftState

#Remarks

Call this procedure to select one or more rows. Indexes of the first and last row in the selected range are passed as the AStartRow and AFinishRow parameters, respectively. To select a single row, pass the same value as both parameters. The optional AShift parameter allows you to emulate an end-user’s actions such as holding down the Ctrl, Alt, and/or Shift keys. With AShift, you can select more than one row range with a few consecutive calls of the SelectRows procedure.

The following code example selects two row ranges within the currently active Table View worksheet.

//...
  dxSpreadSheet1.ActiveSheetAsTable.Selection.SelectRows(1, 1);
  dxSpreadSheet1.ActiveSheetAsTable.Selection.SelectRows(3, 4, [ssCtrl]);

Note

If you need to select either a column or range of columns, use the SelectColumns procedure.

See Also