DEMO SITE v1.7.15

Bulk Delete Bootstrap 4.5 theme

Bulk Delete - Select multiple records and delete. You cannot delete the record with a key : EBGC57SXM-VW47I6AF-401X7DYM

HIDE CODE
<?php

	$xcrud = Xcrud::get_instance();
    $xcrud->table('million');
    $xcrud->limit_list('20,50,100,1000'); // do not use 'all' for large tables
    $xcrud->bulk_select_position('left'); //It can be 'left' or 'right'
    //$xcrud->set_bulk_select(false);
    $xcrud->set_bulk_select(false,'cd_key','=','EBGC57SXM-VW47I6AF-401X7DYM');//Dont be able to select records with ID 287846
	$xcrud->unset_remove(true,'cd_key','=','EBGC57SXM-VW47I6AF-401X7DYM');
	$xcrud->create_action('bulk_delete', 'bulk_delete'); // action callback, function publish_action() in functions.php
    echo $xcrud->render();
?>

<button class="btn btn-primary" onclick="deleteItems();">Delete Selected</button>

<script>
	function deleteItems(){
		var r = confirm("Confirm deletion of " + items.length + " items.");
		if (r == true) {
		  Xcrud.request('.xcrud-ajax',Xcrud.list_data('.xcrud-ajax',{action: 'bulk_delete', task:'action',selected:items,table:'million',identifier:'id'}))
	      items = [];
		} 		
	}
</script>

Million

#User IdCd KeySumActivated 
11850707IZ3KT9G4-44T34MZFV-4U4IDLCQ577.36No
21850708NJBG4D84-4R2Z693FV-5K6TV336577.36No
3185070A7YY7ZNTW-5M2NVXGJV-6KGBYTHEL77.36No
4185070BSAP7SFAI-6H07U7FQJ-7KNC904YV77.36No
5185070BWY9T22PW-6JK8OK0JV-7NN0PYDML77.36No
6185070D3OON0DI-JZIZ6HMJV-NDXYIT52L77.36No
7185070DBQTI0MAC-7BGEGJWBV-8KA0T7ILP77.36No
8185070DLLHX4EU-KQULLFRVV-O9WXGJMZX77.36No
9185070DXDZ9ZOQ-L8U4CSDFV-OUYM6CFA577.36No
10185070E0J8PBFQ-LDMW7PVFV-P0KS8UWA577.36No
Search