Jump to content
uniGUI Discussion Forums
Sign in to follow this  
=GGG=

DBGrid DrawRow

Recommended Posts

Возможно ли в DBGrid закрасить конкретную строку? на данный момент нашел только возможность закрасить ячейку

Share this post


Link to post
Share on other sites

procedure TfrmEdtRetSale.undbgrdPayDrawColumnCell(Sender: TObject; ACol,
  ARow: Integer; Column: TUniDBGridColumn; Attribs: TUniCellAttribs);
begin
  if qryPaymentsVISIBLE.Value=0 then
  begin
    Attribs.Font.Style:=[fsStrikeOut];
    Attribs.Color:=clRed;
  end;
end;
 

  • Upvote 1

Share this post


Link to post
Share on other sites

procedure TfrmEdtRetSale.undbgrdPayDrawColumnCell(Sender: TObject; ACol,

  ARow: Integer; Column: TUniDBGridColumn; Attribs: TUniCellAttribs);

begin

  if qryPaymentsVISIBLE.Value=0 then

  begin

    Attribs.Font.Style:=[fsStrikeOut];

    Attribs.Color:=clRed;

  end;

end;

 

Спасибо! Все работает

Share this post


Link to post
Share on other sites

Странный какой-то код. Мне кажется, что нужно так:

procedure TfrmEdtRetSale.undbgrdPayDrawColumnCell(Sender: TObject; ACol,
  ARow: Integer; Column: TUniDBGridColumn; Attribs: TUniCellAttribs);
begin
  if ARow=0 then
  begin
    Attribs.Font.Style:=[fsStrikeOut];
    Attribs.Color:=clRed;
  end;
end;

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×