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?
array(
'name'=>'col3',
'value'=>'$data->col3',
'filter'=>false,
)
should work.
If you want to remove all filters form the entire CGridView
, configure 'filterPosition'=>''
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With