CGridView ->filter-> inputFields

Hi all,

i have a CGridView table with multiple columns, and i’m using filter on that table,

all columns have a filter input filed,

but i want to make only particular columns searchable (rest should be disabled).

How can i do this? for example make this input field invisible, readonly,

or something like that.

Try CGridView filter property

You could also paste your code so one could help you with ease

it’s a simple, gii generated code




$this->widget('zii.widgets.CDetailView', array(

	'id'=>'mp-grid',

	'dataProvider'=>$model->search(),

	'filter'=>$model,

	'columns'=>array(

	   'mp_id',

          ....




thx for your link to the yii api,

but i don’t get it. I need a example.

Ok my gay…Just me it this way




$this->widget('zii.widgets.CDetailView', array(

        'id'=>'mp-grid',

        'dataProvider'=>$model->search(),

        'filter'=>$model,

        'columns'=>array(

         array('name'=>'mp_id','filter'=>false),



LOL, that was that easy, :lol:

THX

Many other things are like this with Yii…