Class TCADBGrid (unit CADBGrid)

Inherits from

TDBGrid

Constructors


constructor Create(AOwner: TComponent);



Functions

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.

Properties

property SendTitleClickWhenColumnMoved : Boolean


property ColumnWasMoved : Boolean


Events

event OnCellClick : TDBGridClickEvent


event OnTitleClick : TDBGridClickEvent


Variables

FAlwaysSendTitleClick : Boolean;


FColumnWasMoved : Boolean;


FOnCellClick : TDBGridClickEvent;


FOnTitleClick : TDBGridClickEvent;



Constructors


constructor Create(AOwner: TComponent);


Functions


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.


Properties


property SendTitleClickWhenColumnMoved : Boolean


property ColumnWasMoved : Boolean


Events


event OnCellClick : TDBGridClickEvent


event OnTitleClick : TDBGridClickEvent


Variables


FAlwaysSendTitleClick : Boolean;


FColumnWasMoved : Boolean;


FOnCellClick : TDBGridClickEvent;


FOnTitleClick : TDBGridClickEvent;