문제

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?

도움이 되었습니까?

해결책

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'
));
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top