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!

Interactive Grid "Select All" selects just 40 records.

Roel HartmanJul 26 2021 — edited Jul 26 2021

[APEX 20.2]
I have an IG with a few hundred rows with a row selector with “Select All” enabled. The IG doesn’t use pagination but infinite scrolling. But if the user now clicks “Select All” only (the first) 40 records are selected - until the user scrolls down. Which doesn’t make sense to our users... (The selected rows are passed on to a PL/SQL on-demand process)
Is there a way to either increase that “40” to (a lot) more - we accept that page might / will render slower - and then “select all” will really select all…?
The workaround I can think of is determining whether the “select all” is checked and in that case pass the query instead of the selected records to the PLSQL procedure.
Or will this work as a (JavaScript) workaround?
if( $(this.triggeringElement).hasClass("is-selected")){
var spinner = apex.util.showSpinner("#<regionID>");
var grid$ = apex.region("<regionID>").widget().interactiveGrid("getViews","grid")
var model$ = grid$.model
model$.fetchAll(function( status ){
if(status.done){
model$.forEach( function( record, index, id ){
model$.setSelectionState( id, true );
})
grid$.refresh();
grid$.resize();
spinner.remove();
}
})
}
Is there a better - more declarative / low-code kind - of way?

This post has been answered by John Snyders-Oracle on Jul 26 2021
Jump to Answer
Comments
Post Details
Added on Jul 26 2021
2 comments
4,122 views