1) Status Wise row Update & Delete off
Step:1
=====
Create Region--> Intarective Grid
SQL Query:
select ANIMAL_ID, SUPPLIER_ID, ANIMAL_TYPE, STATUS,
CASE WHEN STATUS ='S' THEN 'X'
ELSE 'UD' END EDITABLE
From ANIMALS;
Step:2
=====
Select Grid Region --> Attributes --> Allowed Row Operations Column --> (Select Column) EDITABLE
*** Note: UD = Update (Oracle Define)
=========================================
2) Master Stutas Wise Grid Edit Off
Step:1
=====
Go to Page --> Function and Global Variable Declaration
function myStopFunction() {
let daymmill = $v('P69_STATUS');
if (daymmill == 'S') {
f_setIGreadonly ('readgrid');
} else {
f_setIGeditable ('readgrid');
}
}
function f_setIGreadonly (regionId) {
var gridView = apex
.region(regionId)
.widget()
.interactiveGrid("getViews").grid;
gridView.model.setOption("editable", false);
gridView.singleRowView$.recordView("option", "editable", false);
gridView.view$.grid("option", "editable", false);
var actions = apex.region(regionId).widget().interactiveGrid("getActions");
actions.hide("edit");
actions.hide("selection-add-row");
actions.hide("row-add-row");
actions.hide("selection-duplicate");
actions.hide("row-duplicate");
actions.hide("selection-delete");
actions.hide("row-delete");
actions.hide("save");
actions.hide("change-view");
}
function f_setIGeditable (regionId) {
var gridView = apex
.region(regionId)
.widget()
.interactiveGrid("getViews").grid;
gridView.model.setOption("editable", true);
gridView.singleRowView$.recordView("option", "editable", true);
gridView.view$.grid("option", "editable", true);
var actions = apex.region(regionId).widget().interactiveGrid("getActions");
actions.show("edit");
actions.show("selection-add-row");
actions.show("row-add-row");
actions.show("selection-duplicate");
actions.show("row-duplicate");
actions.show("selection-delete");
actions.show("row-delete");
// actions.show("save");
actions.show("change-view");
}
=====
=====