DEMO SITE v1.7.24

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 
1269319J6DN2T8XZ-A53RX8ZHE-UMJLLA0XN1.44No View Edit Remove
2269319J9I98UF87-A6RBYHYTE-URJG5G49N1.44No View Edit Remove
3269319JHYSQ2Z4N-AB8DYMXHE-V51SZ3AXN1.44No View Edit Remove
4269319L2VTFAZ1J-B5C07J0TE-XNY471U9N1.44No View Edit Remove
5269319LZB3JN9ON-BMHBHGRHE-Z3QA374XN1.44No View Edit Remove
6269319MYYXF28G4-C5C9O7HHY-3O2GGR7LN1.44No View Edit Remove
7269319NIFMY6UH3-CFMU4D25E-3R6D0LRK61.44No View Edit Remove
8269319OF4FW4C6V-CWX6P42TE-3WEAR6R861.44No View Edit Remove
9269319PCWBXTQ5Z-DES7F0THE-41SH7KDW61.44No View Edit Remove
10269319PGMGFVUP3-DGR4YFE5E-42DWBTLK61.44No View Edit Remove
Search