Preview:
<?php Pjax::begin(); 
    $gridColumns = [
[
                'attribute' => 'avance',
                'headerOptions' => ['style' => 'text-align:center; '],
                'contentOptions' => ['style' => 'text-align:center; vertical-align:middle;'],
                'format' => 'raw',
                'value' => function($model) {
                    $string = $model->observacion;
                    $wrappedString = wordwrap($string, 40, "\n");
                    return '<div style="max-height: 80px; overflow: auto; max-width: 200px;">' . nl2br($wrappedString) . '</div>';
                },
                
            ],
            [
                'attribute' => 'observacion',
                'headerOptions' => ['style' => 'text-align:center; '],
                'contentOptions' => ['style' => 'text-align:center; vertical-align:middle;'],
                'format' => 'raw',
                'value' => function($model) {
                    $string = $model->observacion;
                    $wrappedString = wordwrap($string, 40, "\n");
                    return '<div style="max-height: 80px; overflow: auto; max-width: 200px;">' . nl2br($wrappedString) . '</div>';
                },
            ],
]; ?>
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