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 best solutions below
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
you can hide Edit button from interactive grid by do the following steps :
1- Click the page name
2- in the page attributes search for Java Script
3- type the following java script code in Execute When Page Loads
$('[data-action="edit"]').hide();
4- Save and run your page
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.