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 
1113018VKYMGNH36-JCV5P4N20-30EACV6DK2.15No
2113018W475KZ7OI-JONMGEY9K-328B9MCUW2.15No
3113018WLJ3802B6-JZA1MEGRC-33VSQLWFK2.15No
4113018X07Z1AP8I-K8A7HIEUW-35A7Z6KQW2.15No
5113018YSENWK2TU-LBMH2PDEG-3BEIQU3Q82.15No
6113018YX2WMP6KI-LEHLCVRQW-3BUK6RS2W2.15No
7113018Z4MJAUBZ6-LJ42W2XVC-3CKGH6TLK2.15No
8113018ZAU45JCHU-LMX46P6IG-3D5RUIIW82.15No
913154448X32F6B0-E8PEMTATH-6QRDJ1YVO2.69No
101315444OHIQBA70-FOWFFV1XH-7FH2L8E3O2.69No
Add Export into CSV Print
Search