As you know in CGridView there is textbox which allows to filter data. How to add class to those textbox, like: <input type="text" class="">

Taken from the forum:
$this->widget('zii.widgets.grid.CGridView', array
(
'id'=>'your-grid',
'dataProvider'=>$model->search(),
'filter'=>$model,
'columns'=>array
(
'ID',
array
(
'name'=>'attr',
'filter'=>CHtml::textField('attr', '', array('class'=>'asdf')),
),
..
),
));
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