DEMO SITE v1.7.14

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 
14997284EU41OXW6-2WW6DBQQJ-66M4FMSRW2.87No
24997284FORI9XB2-2XGF2ZQIZ-67T2YY2SK2.87No
34997284K1O7LNSU-30C1F8HFV-6DWZTC9TW2.87No
44997284M2MEL44U-31O7QCU3V-6GR8IGATW2.87No
54997284QGPECDM6-34KLZZUUJ-6MWSML1XW2.87No
64997284SP4QILG6-361Q1QWIJ-6Q1IJEVFW2.87No
749972853DWQW7GE-3D3TRD0LN-750SL77WK2.87No
8499728551BPANC6-3E72AVMYJ-77C2ELT3W2.87No
9499728559A2GRV2-XZF65DVBH-77N7R8X6X2.87No
1049972857HSQ4FFQ-3FTHNLGCB-7AS2BJCIK2.87No
Add Export into CSV Print
Search