Jump to content


Photo

NextGrid v6 row background color

rowcolor FillColor

  • Please log in to reply
1 reply to this topic

#1 ramsi

ramsi
  • Members
  • 1 posts

Posted 19 January 2022 - 08:26 PM

hi,

 

i want to set a specific row color. The text color can be set in the columns OnStyleText event and link all other columns to the same event. This way a row can have a specific text color.

but how to color the background of an entire row?

 

the mentioned event has also a var named FillColor but modifying its value has no impact to anything. Seems to be a bug, or there is another way to achieve this?

 

thanks!

 

 



#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,070 posts
  • Gender:Male

Posted 19 January 2022 - 08:53 PM

Hi,

 

I suggest using following event. It is inside GridView and called OnGetCellColor:

 

procedure TForm2.NxReportGridView61GetCellColor(Sender: TObject; ACol,
  ARow: Integer; var CellColor: TColor; State: TNxCellPaintingState);
begin
// example: if ARow = specificrow then CellColor := clLime;
end;

boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users