Kartik grid view in yii2 provides an option to display checkboxes in grid view. How do I delete bulk data by checking the checkboxes? Any help would be greatful. Here is my code:
<?php use kartikgridGridView;?>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'pjax'=>true,
'pjaxSettings'=>[
'neverTimeout'=>true,
],
'columns' => [
['class' => 'kartikgridCheckboxColumn'],
['class' => 'yiigridSerialColumn'],
'hotel_id',
'name',
'address',
'phone_no',
'contact_person',
['class' => 'yiigridActionColumn'],
],
]); ?>
See Question&Answers more detail:os