Reputation: 2793
In my CGridView the table generated by the grid method is using a default css class named .grid-view. Is it possible to change the class name? In my page, I am using two grid views and the theme of the grid view is different, one in a green color and the other in red. How can I do that?
Upvotes: 2
Views: 5745
Reputation: 1409
Please take a look of this documentation http://www.yiiframework.com/doc/api/1.1/CGridView
You can change the class of your filterCssClass
, loadingCssClass
, itemsCssClass
, etc.
Just add the specific attribute to your widget.
$this->widget('zii.widgets.grid.CGridView', array(
'dataProvider'=>$dataProvider,
'columns'=>array(),
'loadingCssClass'=>'loading-class',
'itemsCssClass'=>'item-class'
));
Upvotes: 2