TdxSpreadSheetTableViewSelection.SelectCell(Integer,Integer,TShiftState) Method
Selects a single specified cell within the Table View worksheet.
Declaration
procedure SelectCell(ARow: Integer; AColumn: Integer; AShift: TShiftState = []);
Parameters
Name | Type |
---|---|
ARow | Integer |
AColumn | Integer |
AShift | TShiftState |
Remarks
Call this procedure to select an individual cell whose row and column indexes are passed as the ARow and AColumn parameters, respectively. The AShift parameter allows you to emulate an end-user’s action, such as holding down the Ctrl, Alt, and/or Shift keys. With AShift you can select more than one cell with few consecutive calls of the SelectCell method.
The following code selects five non-adjacent cells within the currently active Table View worksheet.
//...
dxSpreadSheet1.ActiveSheetAsTable.Selection.SelectCell(1, 1);
dxSpreadSheet1.ActiveSheetAsTable.Selection.SelectCell(1, 3, [ssCtrl]);
dxSpreadSheet1.ActiveSheetAsTable.Selection.SelectCell(3, 1, [ssCtrl]);
dxSpreadSheet1.ActiveSheetAsTable.Selection.SelectCell(3, 3, [ssCtrl]);
dxSpreadSheet1.ActiveSheetAsTable.Selection.SelectCell(2, 2, [ssCtrl]);
The following image demonstates the selected cell pattern as a result of execution of this code.
See Also