APEX Interactive Grid Alternating Row Colors

1.2k Views Asked by At

I have an interactive grid in APEX and I am struggling with the actual formatting of the report itself.

Is it possible to have an alternating fill for the rows in the report like Excel?

Also wanted to know what the easiest way to have a standard width of column would be. I saw information on HTML code, but hade no clue where to find where I can input HTML code.

1

There are 1 best solutions below

2
On

Alternating row colors:

  • for interactive grid, right-click "Columns" and then "Create column"
    • name it CB_COLOR
    • its type is "Display only"
    • source is "SQL Expression": MOD(ROWNUM, 2), data type is number

Run the page and then

  • go to "Actions" menu, "Format", Highlight

  • name: Row color

  • highlight: row

  • background color: pick any color

  • condition type: column CB_COLOR equals 1

  • save

  • go to "Actions" menu, "Columns"

  • uncheck the "Displayed" checkbox for CB_COLOR column (so that it isn't visible on the screen)

The result:

enter image description here


Column width:

  • go to "Actions" menu, "Columns"
  • pick any column and set its Minimum column width (pixel)
  • repeat for all columns you're interested in

Alternatively,

  • go to "Actions", "Format"
  • choose **Stretch column widths"