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 access elements in SingleRowView of an Interactive Grid?

John like many othersJun 26 2020 — edited Jun 26 2020

Hello

I can easily access the records and elements of an Interactive Grid in record like this:

var activeRegion = $('#ActiveTab').find('.apex-rds-selected').prop('id').replace('_tab', '');

var trigger = $(this.triggeringElement);

var rowId = trigger.closest('tr').data('id');

// Get grid from active region

var grid = apex.region(activeRegion).widget();

// Get model of curent grid

var model = grid.interactiveGrid('getViews', 'grid').model;

// Get active record

var record = model.getRecord(rowId);

// Get element value of record

var pc_id = model.getValue(record, 'PC_ID');

...

I even found an option to check if the Grid is in record or single view mode:

var singleRowMode = grid.interactiveGrid("getViews").grid.singleRowMode;

What I don't know is how access the elements displayed in the single view mode (like the textfield). Using the operations above on record view shows me an error. This is obvious to me because singlerow view is not based on an array.

So the question is: How I can access the elements (set/get values of elements) in single row view mode?

Thanks in advance for any help!

This post has been answered by Keyser on Jun 26 2020
Jump to Answer
Comments
Post Details
Added on Jun 26 2020
2 comments
2,354 views