rikcage / yii2-combinedcolumn
Combined Column in grid YII2
Installs: 72
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2025-03-29 00:33:04 UTC
README
Сombined DataColumn
Combining several columnы into one with using filters and sorting
composer require rikcage/yii2-combinedcolumn "*"
for use add in GridView columns
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
item_id,
item_name,
[
'class' => 'rikcage\combinedcolumn\CombinedDataColumn',
'labelTemplate' => '{1}<br>{0}',
'valueTemplate' => '{1} {0}',
'filterTemplate' => '<div class="row"><div class="col-md-5">{1}</div><div class="col-md-6">{0}</div></div>',
'labels' => [
'currency',
'amaunt',
],
'attributes'=>['currency:text','rate:text'],
'values'=>['currency','rate'],
'filters'=> [
array('1' => 'usd', '3' => 'eur'), //select for currency
null, //input for rate
],
],
],
]); ?>