How do I set a default configuration for GridView in Yii2 without the widget factory?

前端 未结 2 1532
别那么骄傲
别那么骄傲 2021-02-18 23:30

This is what a gridview looks like in Yii2:

 $dataProvider,
    \'filterModel\' => $searchModel,
          


        
2条回答
  •  执笔经年
    2021-02-18 23:49

    Edit: This answer is no longer applicable since Yii 2.0.0-beta.

    Yii::$objectConfig = [
        'yii\grid\GridView' => [
            'tableOptions'=>['class'=>'table table-condensed']
        ],
    ];
    

提交回复
热议问题