Selection Toolbar Events Validation Styling Advanced Selection 1 Get Selected Row Primary Key Return selected row PK values to a page item. Two approaches depending on APEX version. Selection APEX 24.2+ Before 24.x Copy // Initialization JavaScript Function function (options) { options.defaultGridViewOptions = { selectionStateItem: "P22_SELECTED_IDS" }; return options; } Copy var ig$ = apex.region( "EMP" ).call( "getViews" , "grid" ); var model = ig$.model; var selectedIds = []; ig$.view$.grid( "getSelectedRecords" ).forEach( function (rec) { selectedIds.push(model.getValue(rec, "EMPNO" )); }); $s ( "P22_SELECTED_IDS" , ...
Dynamic Column Labels in Oracle APEX Interactive Grid Using Page Items Oracle APEX / JavaScript · Interactive Grid When building data-driven applications in Oracle APEX, column headers sometimes need to reflect dynamic labels rather than hardcoded ones. This post walks through generating column names from a page item value. The Requirement The goal was straightforward: an Interactive Grid whose column headers are generated dynamically based on a page item, updating both on page load and whenever the user changes the item value manually. The page item P24_LABEL_ITEM holds a range string in this format: RESULT1-RESULT5 This means the grid columns should be labeled RESULT1,RESULT2, RESULT3 ... RESULT5 sequentially — without any hardcoding in the region or column settings. The JavaScript Solution Place the following code under Execute when Page Loads . The same block can be reused inside a Dynamic Action triggered on...