Hodges
(Dev)
August 21, 2016, 2:24am
1
Has anyone been able to set up word-wrapping for a Yii GridView DataColumn?
Here is how I have set up the column:
[
'class' => 'kartik\grid\DataColumn',
'attribute'=>'description',
'format'=>'html',
'contentOptions' => [
'style'=>'max-width:150px; min-height:100px; overflow: auto; word-wrap: break-word;'
],
],
And no matter what settings I use I can’t get the text to wrap. Right now its just cutting off at the max-width. I was hoping to have it wrap causing the row height to dynamically grow but it is not doing that.
Here’s what the column looks like:
7063
Any help you can provide would be much appreciated!
Hodges
(Dev)
August 21, 2016, 6:27pm
2
Figured it out. I had nowrap set in one of my CSS files. Once I removed that everything looks fine…
Has anyone been able to set up word-wrapping for a Yii GridView DataColumn?
Here is how I have set up the column:
[
'class' => 'kartik\grid\DataColumn',
'attribute'=>'description',
'format'=>'html',
'contentOptions' => [
'style'=>'max-width:150px; min-height:100px; overflow: auto; word-wrap: break-word;'
],
],
And no matter what settings I use I can’t get the text to wrap. Right now its just cutting off at the max-width. I was hoping to have it wrap causing the row height to dynamically grow but it is not doing that.
Here’s what the column looks like:
7063
Any help you can provide would be much appreciated!
jpsequeira
(Sequeira Jorgepaulo)
November 27, 2019, 2:51pm
3
[‘attribute’=>‘whatever’, ‘contentOptions’ => [‘style’ =>‘white-space:pre-line;’],],
Hi;
Use also property CSS
text-decoration: ellipse;