DEMO SITE v1.7.15

Bulk Delete Default 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 
1185070EBGC57SXM-VW47I6AF-401X7DYM77.36No
2287688FRBYE0I2-4YWS2DFPS-88WW8KJEM78.08No
3287688UV7DNP5M-57T441EY8-8NOIF9HKE78.08No
4287688Y0T3E6PC-59O0WL8OX-8QRJZ22QF78.08No
52876898SRZA89U-5G0J8EWW0-91AS3RHPI78.08No
62876899FF4OWF6-5GDVCIA2O-91WWVUJS678.08No
72876899LYK0QNM-5GHQ0DHY8-923B06G2E78.08No
8287689DK3KSUJM-5ITFVHV28-95Y8PKPIE78.08No
9287689QFB9FIGA-5QE9NIFBK-9IJ0LEGPQ78.08No
10287689WU6CN1LU-5U68S9FK0-9OSODWWDI78.08No
Add Export into CSV Print
Search