use yh\mdc\components\DataTable; echo DataTable::one([ 'isAjaxRequest' => Yii::$app->request->isAjax ]) ->setId('user-list') ->setGridView([ 'dataProvider' => $dataProvider, 'columns' => [ [ 'class' => '\yh\mdc\widget\grid\SerialColumn', ], [ 'class' => '\yh\mdc\widget\grid\CheckboxColumn', ], [ 'attribute' => 'id', ], 'email:email', ], ])->render();
app.controls.add('user-list-rows', 'select', []); app.controls.add('user-list', 'dataTable', []); app.controls.addObject(app.utils.DataTableProcessing('user-list'));
# |
|
Id
|
Email
|
---|---|---|---|
1 |
|
8 | admin@example.ru |
2 |
|
9 | user@example.ru |
3 |
|
10 | Johnathon@example.ru |
4 |
|
11 | Anthony@example.ru |
5 |
|
12 | Erasmo@example.ru |
6 |
|
13 | Raleigh@example.ru |
7 |
|
14 | Nancie@example.ru |
8 |
|
15 | Tama@example.ru |
9 |
|
16 | Camellia@example.ru |
10 |
|
17 | Augustine@example.ru |