I use CGridView to view my data.
here is my view
<div style="border-bottom:1px solid maroon;margin-bottom:10px;">
<div style="float:left;width:80%;"><?php echo CHtml::link(CHtml::encode('Add New'), array('admin/create')); ?></div>
<div style="float:right;width:20%;color:maroon;font-size:18px;text-align:right;">Admin User</h1</div>
<div style="clear:both;"></div>
</div>
<?php $this->widget('zii.widgets.grid.CGridView', array(
'dataProvider' => $dataProvider,
'columns'=>array(
array(
'name'=>'username',
'type'=>'raw',
'value'=>'$data->username'
),
'display_name',
array(
'name'=>'email',
'value'=>'$data->email',
),
'created_time:datetime',
'edited_time:datetime',
array(
'name' => 'status',
'value' => 'SuperAdmins::lookup_item($data->status)'
),
array(
'class'=>'CButtonColumn',
),
)
)); ?>
I using class CButtonColumn and defaultly it was provide 3 button for each record ( Detail, Update anda Delete)
The problem is, I want add some button (Publish and Hide) button. both button will be displayed alternately (not together). how I can do this sir...
thank you very much...
Dan Din Dun

Help













