Home > Back-end >  Problem solving ongetcellparams used in conjunction with onDrawcolumncell event!
Problem solving ongetcellparams used in conjunction with onDrawcolumncell event!

Time:10-08

Procedure TForm1. DBGridEh1Columns0GetCellParams (Sender: TObject;
EditMode: Boolean; Params: TColCellParamsEh);
The begin
Params. Text:=inttostr (params. Row);
end;//this passage produced serial number

Procedure TForm1. DBGridEh1DrawColumnCell (Sender: TObject;
Const the Rect: TRect; DataCol: Integer; Column: TColumnEh;
State: TGridDrawState);
The begin
If pos (' E 'adoquery1 FieldByName (' #'). AsString) are identical=3 then
DBGridEh1. Canvas. Brush. Color:=clyellow
The else
DBGridEh1. Canvas. Brush. Color:=clwhite;
DBGridEh1. DefaultDrawColumnCell (the rect, datacol, the column, the state);
end;//this passage has produced a brush
//when the above two paragraphs run separately are OK, just in the same project running, just show the color of the brush, don't show the serial number, solve, is this why?

CodePudding user response:

Will set the text painted cover off again?

CodePudding user response:

Seems to be covered, in fact or serial number inside!
What should I do?
  • Related