Friday, 31 March 2017

Interactive Grid - Remove Default First Row Selected

APEX 5.1 has an very powerful reporting feature called Interactive Grid (IG).
When you create an Interactive Grid with RowSelector, you might have noticed that by default the the first row gets selected. This is how the Interactive Grids are designed.

But there might be an requirement where none of the check-box must be selected on landing to the screen. Hence we need to remove the first row default selection in Interactive Grid.

This can be achieved from below simple code:

Use the below code when the page loads. You can either create an Dynamic Action or add this code in "Execute when Page Loads" section of the page Javascript


var ig$ = apex.region("emp").widget();
ig$.interactiveGrid("getViews", ig$.interactiveGrid("getCurrentViewId")).setSelection($());

Change "emp" to whatever your Interactive Grid static id is.

This should remove your default first row selection from your IG. Hope this helps.

3 comments:

  1. Perfect! Exactly what I needed. Thank you.

    ReplyDelete
  2. Hi Prashanth,

    In my scenario, i have created interactive grid with first column as row selector. now i want to checked some reord depends on other grid column like where active_status = 'Y'. i required it on when page load

    ReplyDelete
  3. HOW CAN I SELECT LAST ROW SPECIFIC COLUMN WHEN PAGELOAD ?

    ReplyDelete

Universal Theme - Side Navigation Menu Child Entry Icon Alignment

Hi, There is an issue with the Side Navigation Menu Child Entry Icon Alignment in Universal theme if you are using APEX 5.1 or prior vers...