Page 1 of 1

Change of TIWCGJQGridCOl.Font.Color

PostPosted: 06 Jun 2014 06:59
by sakata
Hi

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

Re: Change of TIWCGJQGridCOl.Font.Color

PostPosted: 06 Jun 2014 10:57
by Jorge Sousa