CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Change of TIWCGJQGridCOl.Font.Color

General discussion

by sakata » 06 Jun 2014 06:59

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
sakata
 
Posts: 5
Joined: 28 Apr 2014 06:43

by Jorge Sousa » 06 Jun 2014 10:57

Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58


Return to General - Archive

cron

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.