Skip to main content

TdxSpreadSheetTableViewSelection.SelectRows(Integer,Integer,TShiftState) Method

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

Declaration

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