How do I maintain the selection when I navigate between pages?
property ‘selectableRows’=>2,
$this->widget('zii.widgets.grid.CGridView', array(
'id'=>'expedientes-grid',
'dataProvider'=>$model->search(),
'filter'=>$model,
'selectableRows'=>2,//select more than one
'columns'=>array(
......
I’m new to yii framework and was trying to use Selgridview, to have a table with some contents that later on i will be retrieving them from a noSQL engine. My problem is, i seem not to be able to show the grid in my index page. I tried to use the example code but always keep getting this :
Fatal error: Call to a member function getId() on a non-object in /var/www/front_end/protected/extensions/selgridview/SelGridView.php on line 33
i dont know if its something on my side or if its in SelGridView code.
//thanks to Horacio Segura http://www.yiiframework.com/extension/selgridview/#c7346
foreach($this->columns as $col) {
if($col instanceof CCheckBoxColumn) {
$col->checked = $checkedExpression;
$col->init();
return;
}
}
SelGridView.php Line 66.
I just want to notice, that this patch is not a good idea.
When user already have CCheckBox column AND checked property defined - this code overrides user-defined checked property and checkboxes never will be checked. I think there is some other fix needed.