I have a grid, in which I have 10-15 rows of questions. sample query similar to my grid sql:
select QUESTION_NO,
QUESTION_TEXT,
YES_RESPONSE,
NO_REPONSE,
REMARKS,
ID,
ANSWER,
' ' as Answer_VALUE,
is_required
from GRID_QUESTIONS
I need to on the grid loading, programmatically set the remarks column (textarea) required if on the same row the is_required is set to Y.
Code I have right now to handle this:
var ig$ = apex.region("questiongrid").widget();
var gridView = ig$.interactiveGrid("getViews", "grid");
var model = gridView.model;
model.forEach(function(record, index) {
var statusValue = model.getValue(record, "IS_REQUIRED");
if (statusValue === 'Y') {
var cellElement = gridView.view$.find("td[data-col='REMARKS']").eq(index);
cellElement.prop("required",true);
}
else {
var cellElement = gridView.view$.find("td[data-col='REMARKS']").eq(index);
cellElement.prop("required",false);
}
});
Code is running BUT not setting the required property… Does anyone see the issue I am missing?
Thank you!
Tony MIller
White Rock, NM