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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Get value from radio group in an interactive grid

I have an interactive grid with a radio group (values Y,N, NA) and need to use this value to show/hide an associated column in grid upon selection or when grid initially displays. I am running a dynamic action on the change event of the radio group that does the following:

// Get the interactive grid widget
var ig$ = apex.region("questiongrid").widget();

// Get the grid view and model
var gridView = ig$.interactiveGrid("getViews", "grid");
var model = gridView.model;

// Get the selected records (returns an array)
var selectedRecords = gridView.getSelectedRecords();

if (selectedRecords.length > 0) {
// Get the first selected record
var currentRecord = selectedRecords[0];

// Retrieve the value from the radio group column
var radioValue = model.getValue(currentRecord, "ANSWER");

// Display the value in an alert
alert("Selected Radio Group Value: " + radioValue);
} else {
alert("No record is selected");
}

My problem is this code is returning an OBJECT and not the actual value of the radio group.. Can anyone suggest a modification to help? I know the code does NOT show/hide columns, it will as soon as I determine the error in how to get the radiogroup value..

Thank you!

Tony Miller
White Rock, NM

This post has been answered by Karel Ekema on Sep 4 2024
Jump to Answer
Comments
Post Details
Added on Sep 4 2024
8 comments
50 views