cgrid view

how to render our own css file of CGridview

$this->widget('zii.widgets.grid.CGridView', array(


	'cssFile'=>'the URL of the CSS file used by this grid view',



Yes,i have tried it…but no effect…

this is my cgrid view

$this->beginwidget('zii.widgets.grid.CGridView', array(



	'pager' => array('cssFile' => Yii::app()->theme->baseUrl . '/css/gridview/styles.css'),

	'cssFile' => Yii::app()->theme->baseUrl . '/css/gridview/styles.css',

And my CSS file is in themes/css/gridview/styles.css…

but it is rendering myproject/assets/c0d67eac/gridview/styles.css

you can also use:

'cssFile' => false,

And include the css in layout/main.php

Yes…i have even tried that but no use… :(

It should work meaning you have some debug to perform.

First try to remove ‘cssFile’ property under ‘pager’ as it is not needed.

Check with firebug or (equivalent) all the css files included.

Check that Yii::app()->theme->baseUrl . ‘/css/gridview/styles.css’ points to a valid file.

I have a CGridView and the data for it comes from a class which has a model wrapped in it and some more properties. The last column has a drop down list and the data for which is calculated using one of the columns in the model.When user changes the data I want to update the value in the table and the model for which is wrapped in the class(which is the data provider for the grid)

I have a button out side the grid with which I want to update the value in the database table.

Is there a way to achieve this. If not with the button outside the grid is it possible to do this in some other way. Any suggestion is appreciated.

Thanks in advance.