title: Yii-Custom Search combobox
body: <p>I have a filed status in database that can store 0 or 1. 0=Inactive and 1=Active. When I create a combobox in yii, admin.php file it searches properly but the text that appears in combobox is 0 and 1, but I to see In-Active and Active, but in option values it should be 0 and 1.
  here is my code...
      
  
  <pre><code> $this-&gt;widget('zii.widgets.grid.CGridView', array(
  'id'=&gt;'cities-grid',
  'dataProvider'=&gt;$model-&gt;search(),
  'filter'=&gt;$model,
  'columns'=&gt;array(
  'id',
  'country.countryname'=&gt;array('name'=&gt;'countryid', 'value'=&gt;'$data-&gt;country-&gt;countryname', 'filter'=&gt;CHtml::listData(Countries::model()-&gt;findAll(array('order'=&gt;'countryname')), 'id', 'countryname')),
  
  'cityname',
  'citycode',
  'citystatus'=&gt;array('name'=&gt;'citystatus', 'value'=&gt;'$data-&gt;setCityStatus() . $data-&gt;getCityStatus($data-&gt;citystatus)', 'filter'=&gt;CHtml::listData(Cities::model()-&gt;findAll(array()), 'citystatus', 'citystatus')),
  'citycoords',
  
  array(
  'class'=&gt;'CButtonColumn',
  'template'=&gt; ($iHasFullAccess == 1 ? '{view}{update}{delete}' :  '{view}') ,
  ),
  ),
  )); 
  ?&gt;
  </code></pre>