Reputation: 2469
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="">
Upvotes: 3
Views: 2271
Reputation: 4309
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')),
),
..
),
));
Upvotes: 5