Procedure TFRMFY.DBGRIDEH7DRAWCOLUMNCELL (Sender: Tobject; Const Rect: TRECT; Datacol: Integer; Column: Tcolumneh; State: TgriddrawState;
Begin
If DSBX.fieldByname ('bx_check'). Asinteger = 1 THENBEGIN IF Column.fieldName = 'bx_endtime' Then Begin // Ring coordinate, determine a list value (using column.field.Asstring = 'ABC' according to the actual situation) If Int (Column.field.AssDatetime) <(int (now) 7) Then // --- This is id = 45 with sender as tdbgrideh do beg can canvas.brush.color: = ClyEllow; // change the bottom CANVAS.FONT.COLOR: = CLRED; // Change font color defaultdrawcolumncell (Rect, Datacol, Column, State); end; if Int (Column.field.asDatetime) = (int (now) 7) Then // - --- This is ID = 45 with sender as tdbgrideh do beg becom canvas.brush.color: = CLBLUE; // change the background color canvas.font.color: = CLWHITE; / / Change font color defaultdrawcolumncell (Rect, Datacol, Column , STATE); End; end; // end field; // end dsbx
END;