Hello:
I’m using Yii version 1.1.14.
I’m running into a problem with the CCheckboxColumn where the header checkbox is NOT selecting/unselecting all of the checkboxes. Can anyone point me in the right direction? I thought this was fixed back in 1.0.7 like two years ago.
Here is my code:
$eventProvider=new CArrayDataProvider($limited_events,
array(
'keyField'=>'instructor1_id',
'pagination'=>false,
)
);
$this->widget('zii.widgets.grid.CGridView', array(
'id'=>'i-grid',
'dataProvider'=>$eventProvider,
'template'=>"{items}",
'selectableRows'=>2,
'showTableOnEmpty'=>true,
'columns'=>array(
array(
'id'=>'selectedItem',
'header'=>'Select',
'class'=>'CCheckBoxColumn',
),
array(
'name'=>'school',
'header'=>'School',
'type'=>'html',
'value'=>array($this,'formatSchoolLink'),
),
array(
'name'=>'title',
'header'=>'Program',
'type'=>'html',
'value'=>array($this,'formatProgramLink'),
),
array(
'name'=>'instructor1',
'header'=>'Instructors',
'value'=>array($this,'formatInstructors'),
'type'=>'html',
),
)
));
And I’ve attached an example of what the grid looks like when I check off the header checkbox (none of the other are checked).
Thanks so much.