Skip to main content

TdxSpreadSheetTableViewSelection.SelectColumns(Integer,Integer,TShiftState) Method

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

Declaration

procedure SelectColumns(AStartColumn: Integer; AFinishColumn: Integer; AShift: TShiftState = []);

Parameters

Name Type
AStartColumn Integer
AFinishColumn Integer
AShift TShiftState

Remarks

Call this procedure to select one or more columns. Indexes of the first and last column in the selected range are passed as the AStartColumn and AFinishColumn parameters, respectively. To select a single column, 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 column range with a few consecutive calls of the SelectColumns procedure.

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

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

Note

If you need to select either a row or range of rows, use the SelectRows procedure.

See Also