Hi all,
I have a problem with a CGridView. I have same data displayed in a grid that has to be selected by the user. Data is not coming from a DB, but from the controller. In order to do that, I have used a CCheckBoxColumn. This is the view code:
<?php
$dataProvider = new CArrayDataProvider($inputFilesList);
$this->widget('zii.widgets.grid.CGridView', array(
'id'=>'inputData',
'dataProvider'=>$dataProvider,
'ajaxUpdate'=>true,
'columns'=>array(
array(
'name'=>'File Name',
'type' => 'raw',
'value' => 'CHtml::encode($data["fileName"])',
'htmlOptions'=>array('width'=>'150')
),
array(
'name'=>'File Path',
'type' => 'raw',
'value' => 'CHtml::encode($data["filePath"])',
'htmlOptions'=>array('width'=>'400')
),
array(
'header'=>'Readable',
'class'=>'CButtonColumn',
'template'=>'{view}',
'buttons' => array(
'view' => array(
'visible'=>'CHtml::encode($data["readable"])',
'label'=>'Readable',
'url'=>'Yii::app()->createUrl("/Operations/operations/view",
array("fullPath" => $data["filePath"].$data["fileName"]))',
'options'=>array('width'=>'350',
)
)
)
),
array(
'header'=>'Selected',
'class'=>'CCheckBoxColumn',
'selectableRows'=>2,
'name'=>'selected',
'checkBoxHtmlOptions'=>array(
'checked'=>'checked',
),
)
),));
?>
¿How can I submit the user multiple selection?
Thank you in advance