Not sure if this is intentional, when I set a column to be a CCheckBoxColumn on multiple selectable rows I would have expected the selected rows to conform to the checked status of the corresponding checkbox.
Currently a row alternates the selected class, ignoring the checkbox status. Would be nice if that could be cleaner, I realise one approach would be to captcher the checkbox status ourselves, but for completeness sake I would have thought this would be an expected behaviour.
Page 1 of 1
CGridView selectableRows quirk
#2
Posted 18 February 2010 - 01:13 PM
Could u insert your code here so I can better understand the problem?
#3
Posted 19 February 2010 - 05:49 PM
<?php $this->widget('zii.widgets.grid.CGridView', array(
'dataProvider'=>$dataProvider,
'showTableOnEmpty'=>false,
'selectableRows'=>2,
'emptyText'=>'Nowt to see.',
'columns'=>array(
array(
'class'=>'CCheckBoxColumn',
'name'=>'delete',
'value'=>'$data->id',
'id'=>'delete'
),
array(
'name'=>'created',
'header'=>'Date Created',
'value'=>'Yii::app()->dateFormatter->formatDateTime($data->created, "medium", null)'
),
),
)); ?>
#4
Posted 06 March 2010 - 07:56 PM
wyldie, on 19 February 2010 - 05:49 PM, said:
<?php $this->widget('zii.widgets.grid.CGridView', array(
'dataProvider'=>$dataProvider,
'showTableOnEmpty'=>false,
'selectableRows'=>2,
'emptyText'=>'Nowt to see.',
'columns'=>array(
array(
'class'=>'CCheckBoxColumn',
'name'=>'delete',
'value'=>'$data->id',
'id'=>'delete'
),
array(
'name'=>'created',
'header'=>'Date Created',
'value'=>'Yii::app()->dateFormatter->formatDateTime($data->created, "medium", null)'
),
),
)); ?>I need same thing. Can you send action controller and view file too? It will really help me.
Share this topic:
Page 1 of 1

Help











