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: Update columns of active row with JS

CMRuepprichJan 11 2017 — edited Feb 11 2017

I would like to update some columns of the currently selected row. Then, after the update, put the IG into edit mode so the user knows to save the changes.

So far I have this, and it works.

var grid        = apex.region("emp").widget().interactiveGrid("getViews","grid");

var model       = grid.model;

var selectedRow = grid.view$.grid("getSelection") ;

var id          = $(selectedRow[0][0]).data('id');

var record      = model.getRecord(id)

model.setValue(record,"JOB",'SALESMAN');

model.setValue(record,"SAL",111);

Is there a better way of getting the selected row (rather than using the jQuery selector on line 4)?

How can I put the IG into edit mode via JavaScript?

Thanks!

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Mar 11 2017
Added on Jan 11 2017
3 comments
5,737 views