【发布时间】:2015-12-12 15:06:12
【问题描述】:
我正在尝试在我的 Yii Web 应用程序中使用 widget 创建一个下拉列表。这是我正在做的事情:
$this->widget('zii.widgets.grid.CGridView', array(
'id' => 'events-grid-future',
'filterPosition' => 'footer',
//'dataProvider' => $model->search('future'),
'dataProvider' => $model->search('future'),
'filter' => $model,
'ajaxUrl' => array('events/admin', 'search_all' => $search_all_value),
'itemsCssClass' => 'table table-hover table-striped table-bordered table-condensed',
'columns' => array(
array(
'name' => 'status',
'header' => 'Job Status',
'value' => 'ucfirst($data->status)',
'filter' => array('All' => 'All', 'Enquiry' => 'Enquiry', 'Contract Issued' => 'Contract Issued', 'Confirmed' => 'Confirmed', 'Hold' => 'Hold', 'Performed' => 'Performed'),
),
),
)
但是下拉菜单看起来是这样的:
有一个空的key 和空的value。我想删除它。有什么帮助吗?
【问题讨论】: