DEMO SITE v1.7.20

Bulk Delete Minimal 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 
1454587HRGE8L7XB-ACX39HH8W-7523QSF666.79No View Edit Remove
2454587I1WKRZ6XR-AJ0H18GB4-799BSE8UM6.79No View Edit Remove
3454587I4KL3XWWV-AKKGPFU6O-7ABX7X9HQ6.79No View Edit Remove
4454587I8O3CATDE-AMYHJGZ37-7BZ7WTCI86.79No View Edit Remove
5454587KGDGHXO2N-BXFUMO1ZK-880OXX3BI6.79No View Edit Remove
6454587KTIAXNRSV-C53LTDMMO-8DARW3GDQ6.79No View Edit Remove
7454587LKGRDVAY7-CKTK52DDC-8O4W77PJ26.79No View Edit Remove
8454587LRFOZBLKF-COVWDIEGG-8QXRO2LHA6.79No View Edit Remove
9454587MKPM30U5R-D5YIYKXF4-92PFU2Q2M6.79No View Edit Remove
10454587PFQEMQEA7-EU1FGUC1C-A84CXPSV26.79No View Edit Remove
Add Export into CSV Print Search