DEMO SITE v1.7.15

Bulk Delete Bootstrap 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 
1947894T310M3CP-YCRYMEOWF-X0ODWJ5H085.21No
29478950WVMZDN9-3L9SJZ3N3-YIG14M0RX85.21No
3947895FHYFLFJD-3VOZLBHEG-3Q9ENE21Z85.21No
4947895LYHHM3TL-40B55EW3S-3UP3KVL8V85.21No
5947895WTI47FMH-482JMZAX4-425MVUEOF85.21No
6947895YYTPN33D-49LSNVEQG-43MQJYK9Z85.21No
79478963I918YRD-4CUKLSFQG-46QZ024FZ85.21No
89478966RKYI7ND-4F6ETIX2G-48ZJU2TZZ85.21No
9947896Q693UXC9-4T1NCJE7S-4MBDE9SHJ85.21No
10947896XCJ4A1QX-4Y679J7NS-4R8QXB6A785.21No
Search