我想洗掉互動式網格上“行操作”按鈕上的單行視圖操作:

此外,我還想洗掉行操作選單上的以下這些操作,因為根據Oracle Apex 21.1 版本的
我遇到了一些關于這個主題的現有帖子,但我不知道為什么它對我不起作用,我嘗試向 IG 添加一個靜態 ID 并將這個 JavaScript 函式放在頁面加載上(歸功于這篇文章):
$(window).on("load", function() {
var actions = apex.region("archiveList").widget().interactiveGrid("getActions");
actions.remove("selection-add-row");
actions.remove("selection-duplicate");
actions.remove("selection-fill");
actions.remove("selection-clear");
actions.remove("selection-delete");
actions.remove("selection-copy-down");
actions.remove("selection-copy");
actions.remove("selection-refresh");
actions.remove("selection-revert");
actions.remove("single-row-view");
actions.remove("row-add-row");
actions.remove("row-duplicate");
actions.remove("row-delete");
actions.remove("row-refresh");
actions.remove("row-revert");
});
總而言之,我想洗掉以下操作:
- 單行視圖
- 復制到剪貼板
- 復制下來
- 填
- 清除
先感謝您,
uj5u.com熱心網友回復:
這對我有用(在 21.2 上)。我在頁面加載時創建了一個動態操作,其中包含一個“執行 javascript”型別的真實操作。我的區域靜態 ID 是“emp-ig”。
let actions = apex.region("emp-ig").call("getActions");
actions.hide("selection-duplicate");
actions.hide("selection-delete");
actions.hide("selection-copy-down");
actions.hide("selection-copy");
actions.hide("selection-refresh");
actions.hide("selection-revert");
actions.hide("selection-add-row");
actions.hide("selection-fill");
actions.hide("selection-clear");
actions.hide("single-row-view");
actions.hide("row-add-row");
actions.hide("row-duplicate");
actions.hide("row-delete");
actions.hide("row-refresh");
actions.hide("row-revert");
在actions.remove并不適用于所有行動的作業,而且還拋出警告在控制臺中。由于您要從行操作選單中洗掉所有操作,因此我將從報告中隱藏該列。
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/371589.html
標籤:javascript 甲骨文 oracle-apex 交互式网格
下一篇:提取不允許的字符
