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!

HTML Expression column not able to also be editable

Chris BoydDec 13 2023 — edited Dec 13 2023

I am using APEX 23.1. I have an Interactive Grid where I want a row column entry (i.e., specific cell) to be highlighted in red if that particular value failed a custom edit check of mine. I had seen other examples in blogs on the topic of conditional formatting, where they suggested the following be added to my source SQL for the Grid (my column in this example from the primary table is “degree_program”):

select …, degree_program,

case when some_condition then 'u-color-39-bg' else null end css_degree_program, …. from …. etc.

The direction was then to hide the CSS_DEGREE_PROGRAM column and then change the DEGREE_PROGRAM column to an “HTML Expression” type and add the following to the “Settings” section's “HTML Expression”:

<span class="&CSS_DEGREE_PROGRAM.">&DEGREE_PROGRAM.</span>

In other words, the direction was to have this additional derived column return an APEX CSS color class value that can then be injected into the corresponding column's HTML tag.

The behavior works, as specific rows that have that column's condition met cause the cell to be highlighted in red. However, here is my problem, which I can't seem to get around, no matter how many different ways I try and use Javascript in Dynamic Actions to override. I still want the highlighted cell to be editable, and APEX is not letting that happen apparently because the column was defined as “HTML Expression” and not something like “Text Field”. I ideally want this page to highlight errors for the user to correct, and then provide them the ability to correct them in the editable cell in question. Does that make sense?

I have no idea why the “HTML Expression” column type prevents being editable, as opposed to Text Fields or Number Fields. It seems unnecessarily arbitrary. Worse yet, columns of that type seem oblivious to any Dynamic Action events like “Click”, so any attempt of mine to use Javascript to change things in that field never even get fired.

Any pointers would be greatly appreciated.

Comments
Post Details
Added on Dec 13 2023
5 comments
1,700 views