skip to Main Content

I’m working with APEX ORACLE ver 23.1.
In an interactive grid, I have a column for selecting values and saving them in database. I set that column to type Popup LOV. The source of LOV is a SQL query in which it displays and returns values with pre-defined style using html code.

I used the following query

select
'<span class="class1">' || value || '</span>' as col1 
-- which will be used for displaying in drop-down list and returning after selecting
-- each value has different text color and different text font
from table1

However, when running application, column using this LOV display plain text but not "formatted" text.

Is it possible to have those values in this column as "formatted" text?

Thanks in advance for your help.

2

Answers


  1. If you can Javascript/JQuery snippet each time this column is updated/rendered, you may give a class name to that column and use:

    $('.your_class').html($('.your_class').text());
    

    This will get the raw value of the cell and attach it as a HTML.

    Login or Signup to reply.
  2. In an interactive grid the data should be clean (to not break sorting/grouping/etc) because the grid can be make editable and then the user only should see data.

    The cell layout is handled in the attribute "Column Initialization JavaScript Function".

    For example: There is a report on EMP where the MGR column is a popup LOV. "Column Initialization JavaScript Function" for the MGR column is set to:

    function(config) {     
        config.defaultGridColumnOptions = {         
            cellTemplate: '<span class="cool-class">&MGR.</span>'     
        };     
        return config; 
    } 
    

    However, if the html markup is different per selected LOV entry and it should change upon selection this might not be an ideal solution.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search