hi all,
i am new to yii and it is my first post.5644
i am having the code in view/admin.php
$this->widget('zii.widgets.grid.CGridView', array(
'id'=>'members-grid',
'dataProvider'=>$model->search(),
'filter'=>$model,
'afterAjaxUpdate' => 'reinstallDatePicker', // (#1)
'columns'=>array(
array(
'name'=>'COM_status',
'value'=>'$data->statusText()',
‘filter’=>CHtml::activeDropDownList($model,‘COM_status’,CHtml::listData(Members::getOnoffs(), ‘id’, ‘title’), array(‘options’ => array(‘1’=>array(‘selected’=>true)))),
'htmlOptions'=>array('style'=>'width:100px;')
),
));
and following code in its model/member.php
public function getOnoffs()
{
return array(
array('id'=>'', 'title'=>'All'),
array('id'=>'active', 'title'=>'Active'),
array('id'=>'pending', 'title'=>'Pending'),
array('id'=>'deleted', 'title'=>'Deleted'),
array('id'=>'waiting for Approval', 'title'=>'Waiting for Approval'),
);
}
when i change the column filter selectbox it display the corresponding record. but the dropdown box does not display the selected options in the column filter…
please help…