Question

How to Highlight the "XYZ" row in the Grid ?

We are trying to highlight the XYZ row in the grid.

For example: Use a when condition to highlight the first row in the grid

Tried this in the "Cell read-only classes" but aint working, Pega when is being ignored and it displays the row in Orange

<pega:when name=pxIsFirstElementInPageList>background-color: orange; </pega:when>

Comments

Keep up to date on this post and subscribe to comments

February 12, 2019 - 9:49am
Response to Santanu

None of the links have the solution. As I read through these they, I see the posts are not concluded. 

 

February 13, 2019 - 8:50am

Hi NSantoshRana,

Could please try the below code and adapt to your scenario?

Copy the code below and past in the inline Style of the row of the Grid. Not the Column, the Row!

<pega:when test=".pxListSubscript== '1' ">background-color:green;</pega:when>

In my test here it's working and highlighting the first row if you need another row just change the pxListSubscript or use another property that you have in the source of your Grid.

let me know if worked for you.

Regards.

September 9, 2019 - 4:57am

Is there a way to achieve this without updating inline style. Since pega recommends not to use inline style. Given approach is working but would need to think of an alternate which doesnt involve inline style. Any clue?

September 13, 2019 - 4:26pm

Does this work - 

Have a repeating layout. Have a wrapper section in the repeating layout. Within this section, you can have two layouts with same properties in them but with different visibility conditions - One for highlight and the other for the non-highlight (this is If your requirement is just to highlight (not color)). Set one layout's container format to 'Information' (where the visibility matches highlight condition) and other layout's container format to default. So all rows that satisfy visibility would appear as highlighted.