Page 1 of 1

Alternate background for grid row

Posted: Mon Aug 30, 2010 2:26 pm
by RichDotson
Based on editing done on data in the grid, I need to set the color of a single grid row to a color different then the color defined in the odd row / even row properties. Is this possible to do at execution time?

Re: Alternate background for grid row

Posted: Wed Sep 01, 2010 11:30 am
by Alex
You can try using the Row Selection properties.

You can set the "row selection", "selection field", "selection value", and "selection background" properties. Then, in your RPG code, populate the selection field appropriately as you are writing subfile records.

Re: Alternate background for grid row

Posted: Thu Sep 02, 2010 12:37 pm
by RichDotson
That works for the initial display but it also allows the user to 'unselect' the row or select additional rows. I am trying to identify the rows in the grid that have an error in the data. The user will then click on an 'Edit' button for the rows in error and make the necessary changes to correct the data. Is there a way to 'turn off' the selection feature but still change the color of the row?

Re: Alternate background for grid row

Posted: Thu Sep 02, 2010 3:37 pm
by Alex
I guess in that case grid selection isn't going to work for you.

But you can try to bind the "background color" property of individual fields in the subfile to trigger the highlighting. You may want to set the width/height on the fields so that it appears as if the entire row is highlighted.