CGridView is way too limited.
Posted 28 February 2010 - 08:04 AM
I went through the CGridView documentation and i saw that it is limited to an AR object only. What if i have an array i would like to sort it with? I am pretty sure that the same functionality can be done using an array with some small modification.
Did anyone found something or can say how to use the CGridView without an AR object but an array?
Posted 28 February 2010 - 08:15 AM
I think you can use CDataProvider to work with pure arrays for example.
Posted 28 February 2010 - 08:20 AM
Posted 28 February 2010 - 09:24 AM
$this->widget('zii.widgets.grid.CGridView', array( 'dataProvider'=>$data_provider, 'columns'=>$store, 'ajaxUpdate' => 'results-query', 'nullDisplay' => '--', 'pager' => array('pageSize'=>20, 'maxButtonCount'=>10, 'actionPrefix' => 'LoadQuery'), 'rowCssClass'=> array('acp-row-on', 'acp-row-off'), ));