peinlich, hat sich erledigt:
Code:
procedure TfrmQuali.grdQLeistungenDrawColumnCell(Sender: TObject;
const Rect: TRect; DataCol: Integer; Column: TColumn;
State: TGridDrawState);
var farbe : tcolor;
begin
with (Sender as TDBGrid), Canvas do begin
farbe := clwindow;
if dmContainer.sqlQualiL.FieldByName('qs_status').AsString = 'E' then farbe := clwindow;
if dmContainer.sqlQualiL.FieldByName('qs_status').AsString = 'K' then farbe := $000674E1;
if dmContainer.sqlQualiL.FieldByName('qs_status').AsString = 'L' then farbe := clsilver;
if dmContainer.sqlQualiL.FieldByName('qs_status').AsString = 'N' then farbe := $0001D2F8;
if dmContainer.sqlQualiL.FieldByName('qs_status').AsString = 'Q' then farbe := $0071AE78;
//if dmContainer.sqlQualiL.FieldByName('qs_status').AsString = 'N/A' then farbe := clred;
if erstesauslesenQ then
begin
Font.Color := clWindowtext;
brush.Color := farbe;
if column.Index = 9 then erstesauslesenQ := false;
end else
begin
if SelectedRows.CurrentRowSelected
then begin
Canvas.Brush.Color := clActiveCaption;
Canvas.Font.Color := clHighlightText;
end else
{if (gdselected in state) then
begin
Font.Color := clHighlightText;
Brush.Color := clActiveCaption;
end else }
begin
font.Color := clwindowtext;
Brush.Color:= farbe;
end;
end;
Fillrect(rect);
DefaultDrawColumnCell(rect, DataCol, Column, State);
end;
end;