1

I want to disable select on my IG when a page item P1_CONDITION meets certain criteria. I hid row action and row selector when condition is met, but if I click on any of the rows, they are still getting selected - custom delete button shows up in the toolbar. How can I disable select conditionally?

I know I can add a condition to the DA that takes care of showing or hiding the custom button but I wanted to disable select altogether. Is that possible?

Coding Duchess
  • 6,445
  • 20
  • 113
  • 209

2 Answers2

1

You can use Javascript snippet as below to disable your grid:

var grid = apex.region("emp").call("getViews").grid;
grid.view$.grid("option", "editable", false);
grid.model.setOption("editable", false);

OR You can also disable the column you want to disable using Execute Javascript Code action or using disable action of dynamic actions as following: enter image description here

cengiz sevimli
  • 1,461
  • 8
  • 19
1

If you do not want the user to click/select the row,

  1. Add the below code in the Execute When Page Loads section of the page.
if ($v("YOUR_ITEM") == 'YOUR_VALUE') {
   $("#emp .a-GV-table tbody .a-GV-row").css('pointer-events','none');
}

Note: emp is the Static ID of the Interactive Grid.

  1. Switch off the Select First Row property of the Interactive Grid.

    enter image description here
Akil_Ramesh
  • 391
  • 3
  • 9