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!

Apex 5.1.1 Interactive Grid Api gotoCell function Bug? Mistake?

Dragos C.May 29 2017 — edited Jun 4 2017

Hello all,

I have special functionality needed in Interactive Grid, a column (B) can be updated only if another column (A) is not null, and I want to show an alert message , when you try to update column (B) , like "You should choose value for column A first!" , and afterwards switch focus to column (A) .
I was able to achieve this in 5.1 using a function from grid widget called "gotoCell" like below :

if(COLUMNA){

  // change value            

}else{

      apex.message.alert('You must enter a value for COLUMNA first !' , 

                          function(){       

                                     var view$ = apex.region("myIG").widget().interactiveGrid("getViews").grid.view$;        

                                     view$.grid("gotoCell", view$.grid("getActiveRecordId"), "COLUMNA");                                                                  

                                      }            

                         );    

}

But now in 5.1.1 I see that there is an additional line of code added which makes this function to not work as it should.
They added an additional check , to see if the grid is initialized before using this , and this is ok but the thing is they made a typo i believe because they are calling the wrong object to check.
The code added is this :

if ( !this.tableData ) {

            return; // grid is not yet initialized

        }

The problem here is that "tableData" is never created and so this function will never run properly, but you can find object "tableData$".
pastedImage_2.png

So my questions is , am i right , is this a mistake ? Should they call "tableData$" instead of "tableData" ?

Please let me know if anyone has any alternative for this functionality .

Thank you.

Best Regards,
Dragos Cotoi

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 2 2017
Added on May 29 2017
5 comments
3,582 views