I’m trying to use tableOptions for GridView
'tableOptions' =>['class' => 'table table-striped table-bordered'],
It always returns a Reflection Exception error saying the class does not exist even when using the default.
what am I missing?
I’m trying to use tableOptions for GridView
'tableOptions' =>['class' => 'table table-striped table-bordered'],
It always returns a Reflection Exception error saying the class does not exist even when using the default.
what am I missing?
Could you show us your code where you tried to set ‘tableOptions’?
GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
//['class' => 'yii\grid\SerialColumn'],
'id',
'customer_product_customerID',
'customer_product_base_productID',
'customer_product_customer_artID',
'customer_product_customer_object_styleID',
'customer_product_alt_layout',
'customer_product_formula',
'customer_product_name',
'customer_product_sub_name',
'customer_product_spanish',
'customer_product_category',
'customer_product_green_seal',
'customer_product_dfe',
'customer_product_dfe_green_seal',
'customer_product_alt_green_seal_txt',
['class' => 'yii\grid\ActionColumn'],
'tableOptions' =>['class' => 'table table-striped table-bordered'],
],
]);
just saw the problem, I have it in the wrong place
GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
//['class' => 'yii\grid\SerialColumn'],
'id',
'customer_product_customerID',
'customer_product_base_productID',
'customer_product_customer_artID',
'customer_product_customer_object_styleID',
'customer_product_alt_layout',
'customer_product_formula',
'customer_product_name',
'customer_product_sub_name',
'customer_product_spanish',
'customer_product_category',
'customer_product_green_seal',
'customer_product_dfe',
'customer_product_dfe_green_seal',
'customer_product_alt_green_seal_txt',
['class' => 'yii\grid\ActionColumn'],
],
'tableOptions' =>['class' => 'table table-striped table-bordered'],
]);
That’s it!