hi all,
I need to implement select all and unselect all for the list of checkboxes in a page.
I am able to display the data with chechboxes. Now i want the user to be provided with the provision of at a time selecting all checkboxes and deselection.
the code is
<?php $this->widget('zii.widgets.grid.CGridView',array(
'id'=>'flatchargesmapping-grid',
'dataProvider' =>$dataProvider,
'columns' => array(
array(
'name' =>'',
'value' => 'CHtml::checkBox("id[]",null,array("value"=>$data->id,"id"=>"rid_".$data->id))',
'type'=>'raw',
'htmlOptions' => array('width'=>5),
'visible' => !Yii::app()->user->isGuest,
),
'id',
'flat_number',
'Charge_code',
array(
'class' => 'CButtonColumn',
'viewButtonUrl' => 'Yii::app()->createUrl("Flatchargesmapping/view",array("id"=>$data["id"]))',
'template'=>'{view}',
),
),
));?>
help me please.