DropDownList Gridview

Hi,

I am a beginner in Yii 1 and I need dropdwonlist gridview in my page.what is your suggestion in this case?

Is there a Extension for this?

Thanks

Do you mean you need a dropdown as one of the filters on a gridview page? If you are using gii and generating crud pages, the gridview will be the admin.php view page. The default text box filters can easily be replaced with dropdowns in yii1. You should see your model attributes listed within the ‘columns’ array i.e.




'columns' => array(

'id',

'username',

'status',

'email'

)



etc.

Find the attribute that you want to be a dropdown. Replace the attribute name with a set of nested arrays. Let’s say in the example above that ‘status’ could be either 1 or 2 and you want to use a dropdown instead of typing the numbers.




'columns' => array(

'id',

'username',

//'status', (I like to comment the attribute in question)

array(

      'name'=>'status',

          'filter'=>array('1'=>'1', '2'=>'2'),

          ),

'email',



The array that provides the values for ‘filter’ could be more complex if needed.

Thank you for tips.

I mean is a Multicolumnt DropDownList widget in Yii similar dropdowngrid jqwidgets