Saturday, July 14, 2018

php - Yii: Drop down Widget

I am trying to create a drop down using widget in my Yii web application. Here is what I am doing:



$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'),
),
),
)


But the drop down appears to be like this:



enter image description here




There is a null key with null value. I want to remove that. any help?

No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...