Advertisement
Guest User

Untitled

a guest
Aug 31st, 2015
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. <?php
  2. echo GridView::widget([
  3. 'dataProvider' => $provider,
  4. 'options' => ['style' => 'max-height:30px;',
  5. 'max-width:10px;',
  6. ],
  7. 'columns' => [
  8. ['class' => 'yiigridSerialColumn',
  9. 'contentOptions'=>['style'=>'width: 30px;']],
  10. //subject
  11. [
  12. 'attribute' => 'subject',
  13. 'format' => 'text',
  14.  
  15. 'label' => 'Subject',
  16. 'contentOptions'=>[
  17. 'style'=>
  18. ['width: 10px;',],
  19.  
  20. ]
  21. ],
  22. //body
  23. [
  24. 'attribute' => 'body',
  25. 'format' => 'text',
  26. 'label' => 'Body',
  27. 'contentOptions'=>['style'=> 'max-width: 100px;', 'height: 100px']
  28. ],
  29. ['class' => 'yiigridActionColumn',
  30. 'controller'=>null,
  31. 'header'=>'Action',
  32. 'headerOptions' => ['width' => '70'],
  33. ],
  34. ],
  35. 'tableOptions' =>['class' => 'table table-striped table-bordered'],
  36. ]);
  37. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement