This is my CGridView:
$this->widget('zii.widgets.grid.CGridView', array(
'id'=>'gridUsersCoursesId',
'dataProvider'=>$model->search(),
'filter'=>$model,
'columns'=>array(
array(
'name'=>'id',
'htmlOptions' => array('class'=>'users-courses-id'),
),
array (
'name' => 'relUsers.name',
'header' => 'Name',
'value' => '$data->relUsers->first_name . " " . $data->relUsers->last_name'
),
array(
'name'=>'status',
'htmlOptions' => array('class'=>'users-courses-status'),
),
'relUsers.username',
array (
'header' => 'Role',
'value' => '$data->relUsers->role->name'
),
array(
'class' => 'CButtonColumn',
'visible'=>($this->user->isAdmin() || $this->user->isInstructor()),
'template'=>'{view}{delete}{update}{changestatus}',
'header'=>'Manage',
'buttons' => array(
'changestatus' => array(
'label' => 'Change Status',
'imageUrl' => $this->createUrl('images/changestatus.png'),
'options' => array('id'=>'btnChangeStatus'),
),
),
),
),
));
I have try to hide id column and id filter field and it successfully hidden, but because the filter field was hidden its cause other filter field shifted to the right, it make filter field and column not match each others. so i think i should remove it, not hide, or there is other best solution. I hope you can help me