PDF : How to add background color in a data grid

0
Hi team, I am generating a PDF file that displays a list of objects Requirement: I need to change the background color of one of the column in this list based on some condition while generating the PDF. but problem is I need to change background color of particular row in that column. say for example: columns: A B C row1a row1b row1c row2a row2b row2c row3a row3b - row3c row4a row4b row4c In this case I need to change the background color for -row3c Could anyone of you please guide me?
asked
4 answers
0

You can use both the Class and the Style options to provide styling to elements. Create the element twice (one with and one without the styling)

Use Conditional Visibility to make either one or the other active

answered
0

but problem is I need to change background color of particular row in that column. say for example: columns: A B C row1a row1b row1c row2a row2b row2c row3a row3b - row3c row4a row4b row4c

In this case I need to change the background color for -row3c

answered
0

On what condition does your column/row colors?

If you use Lex's solution, I think you should use a templategrid / listview instead of a datagrid.

answered
0

You can try using a nested table, by placing a 2x1 table inside of the cell (row 3c) of this larger table. Since you can only hide elements based on rows and not columns, you can do as Lex suggested and create the row twice, which is the 2 x 1 table (one with the original styling and the other with the changed styling) and display one or the other based on a conditional visibility.

answered