3 Ways to Unselect Default Checkbox in Interactive Grid Oracle APEX

How to Unselect Default Checkbox in Interactiv Grid Oracle APEX?

Preview

In some situation we don’t want default checkbox selection in Interactive Grid on those cases, there are 3 ways to unselect default checkbox from Interactive grid using jquery.

  • Create an Interactive grid and define region Id ontoor. To demonstrate this example I am using EMP table with following SQL query:
select EMPNO,
       ENAME,
       JOB,
       MGR,
       HIREDATE,
       SAL,
       COMM,
       DEPTNO
  from EMP


Solution: 1

  • Copy and paste following jquery to Execute when Page Loads section or call on page load dynamic action: 
$(function() {
	//ontoor is region static ID
    var view = apex.region("ontoor").widget().interactiveGrid("getViews", "grid");
    view.setSelectedRecords($())
});


Solution: 2

  • Copy and paste following jQuery to Execute when Page Loads section or call on page load dynamic action: 
$(function() {  
	//ontoor is region static ID
  $("#ontoor .a-GV").first().grid( "setSelection", [] );  
});  


Solution: 3

  • Copy and paste following jquery to Execute when Page Loads section or call on page load dynamic action: 
//ontoor is region static ID
apex.region("ontoor").widget().interactiveGrid("setSelectedRecords", []);

  • Copy and paste following jQuery to region attributes in JavaScript Initialization Code: 
function(config){
		config.initialSelection = false;
		 return config;
}


Demo

You might also like