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!

Running JS-Script after Refresh IG

HansMueller69Dec 18 2023

Hello

I need your help. I have a Javascript where I refresh an IG.

After refreshing I want some changes on the IG for example setting the background color of some cells.

The Refresh-Process can take time about 2-5 Seconds..

I want to start the BackgroundColor-Setting Process after finishing the refresh.

How can I do it purely in JS?

var ig$ = apex.region("IG_GESELLSCHAFTSKONTO_ID").widget();
var grid = ig$.interactiveGrid("getViews", "grid");
var model = grid.model;
console.log("1: Before Refresh");
ig$.interactiveGrid("refresh");
console.log("2: After Refresh");

ig$.on("interactivegridrefresh", function(event, ui) {
   // Code, der nach dem Abschluss des Refreshs ausgeführt werden soll
               console.log("3: Before Function Call");
           afterRefreshOperation1();
});

Unfortunately it does not work… I tried it with subscribe too but it does not work either.

Thanks!

This post has been answered by Karel Ekema on Dec 18 2023
Jump to Answer
Comments
Post Details
Added on Dec 18 2023
3 comments
422 views