if query1.FieldByName('seqno').asinteger>30 then
begin
DBGrid1.Canvas.Brush.Color := clMoneyGreen;
DBGrid1.Canvas.Font.Color := clGreen;
DBGrid1.Canvas.FillRect(Rect);
end;
if query1.FieldByName('seqno').asinteger<=30 then
begin
DBGrid1.Canvas.Brush.Color := clMoneyGreen;
DBGrid1.Canvas.Font.Color := clBlue;
DBGrid1.Canvas.FillRect(Rect);
end;
if quey1.FieldByName('seqno').asinteger<=20 then
begin
DBGrid1.Canvas.Brush.Color := clMoneyGreen;
DBGrid1.Canvas.Font.Color := clRed;
DBGrid1.Canvas.FillRect(Rect);
end;
if quey1.FieldByName('seqno').asinteger<=10 then
begin
DBGrid1.Canvas.Brush.Color := clMoneyGreen;
DBGrid1.Canvas.Font.Color := clYellow;
DBGrid1.Canvas.FillRect(Rect);
end;
DBGrid1.DefaultDrawColumnCell(Rect,DataCol,Column,State);