Oracle APEX: Tooltip on cell of the report
Asked Answered
E

2

7

I have an APEX tabular form, all columns of which are standard report columns. Is it possible to display a tooltip on mouse over of a particular cell of the report?

Elna answered 22/1, 2010 at 2:18 Comment(0)
S
12

In the report column attributes look for the region named Column Formatting. Inside this section is a text box for an "HTML Expression". Here you can add html to the report column contents e.g., <span title="My tooltip text">#COLUMN_NAME#</span>

The tooltip text could be from another column, you would just replace the contents of the title attribute with the column name surrounded by hashes.

Secateurs answered 1/2, 2010 at 14:2 Comment(0)
B
3

SOLUTION 1: If your record needs to be editable then this solution works:

Under column attributes go to LINK For Target: Type - URL and URL is just a hashtag
URL: #

Link Text: &COLUMN_NAME.

Link Attributes: title="&COLUMN_NAME." class="column_name_class"

Then in your inline CSS add the following

.column_name_class{
    text-decoration: none !important; 
 }

Solution one I definitely prefer. But here is solution 2 anyways.

SOLUTION 2:

See here for the solution on JSDoc: Widget Grid

You can also initialize the grid with the tooltip option specified.

function( options ) {
    options.defaultGridViewOptions = {
        tooltip: {
            content: function( callback, model, recordMeta, colMeta, columnDef ) {
                var text;
                // calculate the tooltip text
                return text;
            }
        }
    };
    return options;
}
} );

Calculating the tooltip :

config.defaultGridViewOptions = {
    tooltip: {
        content: function( callback, model, recordMeta, colMeta, columnDef ) {
            
            return model.getValue( recordMeta.record, "COLUMN_NAME");
          
        }
    }
}
function( options ) {
options.defaultGridViewOptions = {
    tooltip: {
        content: function( callback, model, recordMeta, colMeta, columnDef ) {
            var text;
            // calculate the tooltip text
            return model.getValue( recordMeta.record, "COLUMN_NAME");
           
        }
    }
};
return options;

}

Buchanan answered 5/7, 2022 at 13:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.