I want to change the TIWCGJQGridCOl.Font.Color by TField.Value
VCL.TDBGrid code
- Code: Select all
procedure TForm1F.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState);
var
mColor: TColor;
begin
inherited;
if Column.Field.DataSet.FieldByName('IsDone').asBoolean then mColor := clBlue else mColor := clBlack;
if Column.Field is TNumericField then
if Column.Field.asInteger < 0 then mColor := clRed;
DBGrid1.Canvas.Font.Color := mColor;
DBGrid1.DefaultDrawColumnCell(Rect, DataCol, Column, State);
end;
How do you code it in TIWCGJQGrid?
Best regards