Select All / Unselect All Checkbox in Interactive Report and Delete Select row Oracle Apex
2. Use the following code inside the report code
select LOG_ID, LOGIN_USER, IP_ADDRESS, LOGIN_TIME, LOGOUT_TIME, LOG_DATE,
apex_item.hidden(01,LOG_ID)||
apex_item.checkbox2(02,LOG_ID)
check1 from USERS_LOG
3. Use the following code in the heading of the CHECK1 item
<input type="checkbox" id="selectUnselectAll" title="Select/UnselectAll">
4. Disable the Escape special characters option from the Security option
of the CHECK1 item
5. Enter the Static ID =partnerslRR from Advanced as you like in the report
6. Create Dynamic Action >> Event >>Chang>> Selection Type >> jQuery Selector
>> jQuery Selector = #selectUnselectAll
Action >> Execute JavaScript Code >>
if ( $( '#selectUnselectAll' ).is(':checked') ) {
$('input[type=checkbox][name=f02]').attr('checked',true);
}
else {
$('input[type=checkbox][name=f02]').attr('checked',false);
}
7. Create a Delete Button
8. Create a Delete Processes >> Type = Execute Code >> Source Language =
5. Enter the Static ID =partnerslRR from Advanced as you like in the report
6. Create Dynamic Action >> Event >>Chang>> Selection Type >> jQuery Selector
>> jQuery Selector = #selectUnselectAll
Action >> Execute JavaScript Code >>
if ( $( '#selectUnselectAll' ).is(':checked') ) {
$('input[type=checkbox][name=f02]').attr('checked',true);
}
else {
$('input[type=checkbox][name=f02]').attr('checked',false);
}
7. Create a Delete Button
8. Create a Delete Processes >> Type = Execute Code >> Source Language =
>> PL/SQL Code :
FOR I in 1..APEX_APPLICATION.G_F02.COUNT LOOP DELETE USERS_LOG WHERE LOG_ID=APEX_APPLICATION.G_F02(i); END LOOP;
FOR I in 1..APEX_APPLICATION.G_F02.COUNT LOOP DELETE USERS_LOG WHERE LOG_ID=APEX_APPLICATION.G_F02(i); END LOOP;
Server-side Condition >> When Button Pressed = Delete
ADD- $('#selectUnselectAll').click(function () {
ReplyDelete$('input:checkbox').prop('checked', this.checked);
}); in Function and Global Variable Declaration of the page. Defect on single checkbox fixed with this.