Class TCADBGrid (unit CADBGrid) |
Inherits from
TDBGrid
constructor Create(AOwner: TComponent);
procedure CellClick(Column: TColumn);
procedure ColumnMoved(FromIndex, ToIndex: Longint);
ColumnMoved is sent before MouseUp, so this sets the FColumnWasMoved
True which then prevents and OnTitleClick handler from executing if
FIgnoreWhenColMoved is True.
procedure MouseUp(Button: TMouseButton; Shift: TShiftState;
X, Y: Integer);
procedure TitleClick(Column: TColumn);
if dgIndicator then Cell.
property SendTitleClickWhenColumnMoved : Boolean
property ColumnWasMoved : Boolean
event OnCellClick : TDBGridClickEvent
event OnTitleClick : TDBGridClickEvent
FAlwaysSendTitleClick : Boolean;
FColumnWasMoved : Boolean;
FOnCellClick : TDBGridClickEvent;
FOnTitleClick : TDBGridClickEvent;
constructor Create(AOwner: TComponent);
procedure CellClick(Column: TColumn);
procedure ColumnMoved(FromIndex, ToIndex: Longint);
ColumnMoved is sent before MouseUp, so this sets the FColumnWasMoved
True which then prevents and OnTitleClick handler from executing if
FIgnoreWhenColMoved is True.
Note Well: If you provide for the moving of grid columns with other
than the mouse, be sure to set ColumnMoved False after moving the
column; otherwise MouseUp on a title will not work the first time.
procedure MouseUp(Button: TMouseButton; Shift: TShiftState;
X, Y: Integer);
procedure TitleClick(Column: TColumn);
if dgIndicator then Cell.X = 0 when the mouse click occurs with
the mouse cursor on the indicator column, in which case let
normal navigaton to new row occur.
property SendTitleClickWhenColumnMoved : Boolean
property ColumnWasMoved : Boolean
event OnCellClick : TDBGridClickEvent
event OnTitleClick : TDBGridClickEvent
FAlwaysSendTitleClick : Boolean;
FColumnWasMoved : Boolean;
FOnCellClick : TDBGridClickEvent;
FOnTitleClick : TDBGridClickEvent;