Yii CGridView hide filter input only

yii

Solution

array(
    'name'=>'col3',
    'value'=>'$data->col3',
    'filter'=>false,
)

should work.

Problem

When using CGridView, the filter input fields are automatically generated by the component. I want to select which columns will show the input field. For example: My model has 5 columns. I want CGridView to show the input filter ONLY for columns 1 and 2. Is there a way to do it without using CSS or jQuery, just adding some code on the CGridView options?

Original source