In Oracle APEX, long column names in Interactive Grids often make the headers look cluttered or misaligned. Many developers manually insert <br> tags in the column headings to fix this — but that’s time-consuming and hard to maintain. Here’s a smarter and cleaner way! With a small JavaScript snippet, you can automatically wrap column headers wherever you want — simply by adding an underscore ( _ ) in the column name. The script detects these underscores and replaces them with line breaks ( <br> ), giving you perfectly wrapped headings without touching the HTML. Just add this script to the Page Load event, and your column headings will format themselves dynamically based on the number of underscores. Clean, flexible, and maintenance-free! $("#EMP th span.a-GV-headerLabel").each(function() { // Emp - static id of the IG let text = $(this).text(); if (text.includes("_")) { $(this).html(text.replace(/_/g, "<br>")); } }); ...
In Oracle APEX, Interactive Reports provide built-in flexibility — including the convenient ability to place buttons right next to the search bar. However, Classic Reports don’t offer that option out of the box. While working with a project that used the Standard template , I wanted to achieve the same clean and functional layout in a Classic Report. With a bit of creative use of jQuery and APEX region structure , I successfully replicated the Interactive Report’s button placement, giving the Classic Report a modern and consistent look. Paste the below code on Execute on page load section $(document).ready(function () { if ($('#Btn_Open').length) { $('#EMP .t-Region-headerItems--title').append($('#Btn_Open')); $('#EMP .t-Region-headerItems--title').append($('#P8_DEPT_CONTAINER')); } }); EMP ...