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!

How to select rows in Interactive Grid via Javascript

Gerard OtinJul 4 2017 — edited Jul 6 2017

Hello,

We are developing an app and trying IGs and we found they are pretty useful, but yet a bit unmature;

Our goal is to refresh via AJAX some regions of a page, including a IG. 90% of the values of the page depends on what row (single-row) is selected on IG, so that when IG selection is changed the values are refreshed.

Frist we tried this:

var ig$ = apex.region("emp").widget();

ig$.interactiveGrid("getViews", ig$.interactiveGrid("getCurrentViewId")).refresh()

But it seemed that the data in the region was not refreshed with data in DB, so we put a DA that refreshes the IG.

Now, we found that when the IG is refreshed, the row that was selected is lost and no selection is done by default.

We saw this code

apex.region("emp").widget().interactiveGrid("setSelectedRecords", []);

here Interactive Grid Row Selector and we were wondering if it's possible to select a row of a IG via Javascript.

Thank you all,

Regards,

This post has been answered by John Snyders-Oracle on Jul 5 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 3 2017
Added on Jul 4 2017
3 comments
11,006 views