RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomDrawGrid.SelectCell Method

Determines whether a particular cell in the grid can be selected.

Pascal
function SelectCell(ACol: Longint; ARow: Longint): Boolean; override;
C++
virtual __fastcall Boolean SelectCell(Longint ACol, Longint ARow);

Grid controls call SelectCell internally before attempting to move selection to a the cell identified by the ACol and ARow parameters. ACol and ARow are the column and row indexes for the cell, where the first column has index 0, and the top row has index 0. 

SelectCell generates an OnSelectCell event. This method then returns true, unless the OnSelectCell event handler indicates that the cell should not be selected. Descendants of TCustomDrawGrid can override this method to check the properties of the information displayed in the cell or block the OnSelectCell event. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!