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!

Programmatically toggle edit mode in IG 23.1

_LeeBurgess_Jun 20 2023

After an IG is saved (using native button and custom save proc), I notice that it remains in edit mode. This is an issue as I have some buttons at the top of the page that I am using for bulk processes (like bulk edit where I will select multiple records). I only have this button active on the condition there is at least 1 record selected (and grid is not in edit mode). This works fine until I save, at which point the grid stays in edit mode.

I use this code to check edit mode status:

apex.region(pGridId).call("getActions").get("edit);

So ultimately I want to turn off edit mode after my grid has saved.

I've found this method in the docs but I can't get it to work.

When I run the example code above in the console (replacing “.selector” with "#the-static-id-of-my-grid")

I get - "cannot call methods on grid prior to initialization; attempted to call method ‘setEditMode’.

Can someone explain how to use this code correctly, or suggest another way of doing this?

Thanks in advance.

This post has been answered by _LeeBurgess_ on Jun 21 2023
Jump to Answer
Comments
Post Details
Added on Jun 20 2023
2 comments
2,066 views