I am using an interactive grid in oracle apex. When we double click the grid it goes into an edit mode. I want to get rid of this functionality because my grid is not editable this way.
How to disable edit mode of oracle apex interactive grid on double click?
4.9k views Asked by Gorupria At
4
There are 4 answers
0
On
I have been trying to replicate the same from a long time. Just found a workaround for this.
- Create Dynamic Action on Interactive grid on event Double Click
- Set Action = Execute JavaScript Code
- Use following code in action
apex.region("emp").widget().interactiveGrid("getActions").set("edit", false);
Make sure to replace emp with static ID which you should provide in IG region.
0
On
To prevent going into edit mode, you can extend the existing grid widget's setEditMode public method:
(function($){
var bodyElem = document.getElementsByTagName("body")[0];
bodyElem.addEventListener("load", function(event) {
if (event.target.nodeName === "SCRIPT")
{
// grid subwidget
let srcAttr = event.target.getAttribute("src");
if (srcAttr && srcAttr.includes('widget.grid'))
{
$.widget("apex.grid", $.apex.grid, {
setEditMode: function (editMode, select) {
if (editModeDisabled)
{
return;
}
return this._super(editMode, select);
}
});
}
}
}, true);
})(apex.jQuery);
if you don't want the user to be able to edit row content, change the column type under Report -> Columns -> Your column -> Type. For example try setting it to Display only so that the users cannot change the content.