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 
1287846D78Z17IEO-8ER1S8INR-6AYLKJ0221.98No
2287846DG6Q5E9EO-8KG0NPCNR-6F8988PI21.98No
3287846E091PV9EO-8X85W7NBR-6OT7JTXWA1.98No
4287846E9RUP1IEO-93AJJYANR-6TCX4VAFE1.98No
5287846EHYT6O0EO-98IFXBANR-6X9S4HLRE1.98No
6287846FBSKAV9EO-9RIGNZNBR-7BIKCIZ8A1.98No
7287846FG78YMM2Q-9UBJUBQLH-7DMCHY4N71.98No
8287846FQYBAJ9EO-A164IZ7BR-7IR70AYMY1.98No
9287846G0VOCW9EO-A7HS1TCNR-7NHUVLIU21.98No
10287846G9VF7JREO-AD80MEPZR-7RSGSLLBU1.98No
Search