principio de la tabla: [ 'class' => 'yii\grid\ActionColumn', 'contentOptions' => ['style' => 'text-align:center; width:2%; vertical-align:middle;'], ] Final de la tabla: 'class' => 'yii\grid\ActionColumn', 'contentOptions' => ['style' => 'text-align:center; width:2%; vertical-align:middle;'], listas: 'id_reporte' => [ 'attribute' => 'id_reporte', 'headerOptions' => ['style' => 'text-align:center; width:5%;text-color:white;'], 'contentOptions' => ['style' => 'text-align:center; vertical-align:middle; white-space: pre-line;'], 'label' => 'Tipo de Reporte', 'filter' => app\models\Reportes::lista(), 'format' => 'html', 'value' => function ($data) { $s = app\models\Reportes::find()->where(['id_reporte' => $data->id_reporte])->one(); $desc_reporte = ($s) ? $s->desc_reporte : ''; $desc_reporte = nl2br($desc_reporte); $desc_reporte = wordwrap($desc_reporte, 20, "<br>\n"); return $desc_reporte; } ], campos: 'attribute' => 'fecha_hora', 'value' => 'fecha_hora', 'headerOptions' => ['style' => 'text-align:center; width:10%;text-color:white;'], 'contentOptions' => ['style' => 'text-align:center; vertical-align:middle;'],
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter