H
H
hollanditkzn2017-05-29 19:14:57
Yii
hollanditkzn, 2017-05-29 19:14:57

How to make it so that the data does not go beyond the page in the widget?

I am using demos.krajee.com/grid widget. It turns out that in the description the text is not transferred, but goes and completely expands the page. I tried different methods, but nothing works. Maybe someone faced this problem
Here is a screenshot of what happened 65007eb750014981a2d4e44e8c5e6145.png
And here is my code

<?= GridView::widget([
        'dataProvider' => $dataProviderWork,
        'floatHeader' => true,
        'pjax' => true,
        'tableOptions' 	=> ['class' => 'table table-bordered'],
    'striped' => false,
    'hover'=>true,
        'columns' => [
      [
        'class'=>'kartik\grid\ExpandRowColumn',
        'width'=>'50px',
        'value' => function ($model, $key, $index) { 
          return GridView::ROW_COLLAPSED;
        },
        'detail'=>function ($model, $key, $index, $column) {
          $model;
          return Yii::$app->controller->renderPartial('_zakaz', ['model'=>$model]);
        },
        'enableRowClick' => true,
                'expandOneOnly' => true,
      ],
            [
                'attribute' => 'id_zakaz',
                'headerOptions' => ['width' => '20'],
                'value' => 'prefics',
            ],
            [
            'attribute' => 'description',
            'contentOptions'=>['style'=>'white-space: normal;'],
            ],
           ...
        ],
    ]); ?>

And in the _zakaz file, I added an ordinary fish for 150 lines and this effect came out. I don't understand how to solve this problem

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
hollanditkzn, 2017-05-30
@hollanditkzn

.grid-view td {
white-space: inherit;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question