OnSelectCell (Delphi)
Description
The following code ensures that you cannot select a cell unless it is empty.
Code
procedure TForm1.StringGrid1SelectCell(Sender: TObject; ACol, ARow: Longint; var CanSelect: Boolean);
begin
CanSelect := (StringGrid1.Cells[ACol, ARow]='')
end;
Uses
- Vcl.Grids.TCustomDrawGrid.OnSelectCell ( fr | de | ja )