Rx component RxDBGrid add more two events
Original Reporter info from Mantis: freeman35
-
Reporter name:
Original Reporter info from Mantis: freeman35
- Reporter name:
Description:
Add 2 events more,
OnRxTitleClick : I added just Shift: TShiftState parameter, So can handle easy shift or ctrl click and set multi column sort etc.
OnDrawRxColumnCell : This is Column's event. Column.OnDrawColumnCell same event name with rxgrid. ACanvas parameter useful
This patch just add code, not change any code or properties name
Additional information:
procedure TFRM_X.GRD_Columns2DrawRxColumnCell(Sender: TObject; ACanvas: TCanvas; const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState; var AText: String);
begin
if(Column.Field<>nil)and(Column.Field.AsInteger<0)then begin
ACanvas.Brush.Color := ClRed;
ACanvas.Font.Style := [fsBold];
AText := 'Negative Value';
end;
// This code for need Editor position, maybe add in Column class, and maybe add TWincontrol property too, we will see :)
if (gdFocused in State)then FGridCellRect := Rect;
end;
Mantis conversion info:
- Mantis ID: 25524
- OS: all
- OS Build: all
- Platform: all
- Monitored by: » @JuhaManninen (Juha Manninen)