Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interactive Grid: JavaScript to dynamically add CSS classes to cells in the grid depending on the value in another cell

Reto TschanSep 16 2023

I have an IG to capture expenses. Simplified, I have the following columns:

  • Booking date
  • Expense type ID
  • Qty
  • Amount
  • Description
  • ... and a few more, which are not relevant to the discussion

Depending on the expense type, some fields get enabled/disabled or calculated according to a rule set when the expense type (select list) changes its value.

To help guide the user visually, which fields need to be filled for which expense type, I'd like to add CSS classes for the background color to the IG. I.e. different colors for mandatory, optional, blocked, and calculated fields.

Goal:
I need a JavaScript, which applies CSS classes to cells in the IG depending on the value in the expense_type_id cell.

@john-snyders-oracle as requested by @carsten-czarski-oracle - Thanks a lot!

This post has been answered by John Snyders-Oracle on Sep 29 2023
Jump to Answer
Comments
Post Details
Added on Sep 16 2023
5 comments
2,903 views