How To Enable Filter In Particular Field

My model is, as follows:


$this->breadcrumbs = array(




<h1>Manage Projects</h1>


$this->widget(‘bootstrap.widgets.BootGridView’, array(

'id' =&gt; 'project-grid',

'dataProvider' =&gt; &#036;model-&gt;search(),


'columns' =&gt; array(

    array('header' =&gt; 'Name',

        'value' =&gt; '&#036;data-&gt;client-&gt;firstname.&quot; &quot;.&#036;data-&gt;client-&gt;lastname'),

    array('header' =&gt; 'picture',

        'type' =&gt; 'raw',

        'value' =&gt; '&#036;data-&gt;getProjectPicture(&#036;data-&gt;id)'),

    array('header'=&gt;'Status','name' =&gt; 'is_approved',

        'type' =&gt; 'raw',

        'value' =&gt; '&#036;data-&gt;is_approved == 1 ? &quot;Approved&quot; : CHtml::ajaxLink(&quot;Not Approved&quot;, array(&quot;approve&quot;, &quot;id&quot; =&gt; &#036;data-&gt;id), array(&quot;success&quot; =&gt; &quot;approve(&#036;data-&gt;id)&quot;), array(&quot;id&quot; =&gt; &quot;approve_&quot; . &#036;data-&gt;id))'


    array('name' =&gt; 'date',

        'value' =&gt; 'date(&quot;Y/m/d&quot;, strtotime(&#036;data-&gt;date))'),

    array('header' =&gt; 'Managed By',

        'value' =&gt; '&#036;data-&gt;getAdvisor(&#036;data-&gt;id)'),    





        'class' =&gt; 'BootButtonColumn',

        'template' =&gt; '{view}{delete}',





<script type="text/javascript">

function approve(id){




All the fields have sorting function, except in the column, name and picture, How do I enable that.?


i think you can use the



             'id', 'name', 'picture',



more refrence

Sorry, That did not solve my problem. Here, I came to realize one thing, is, all other fields come from same table, but, the Name come from another table, so filter model does not work. So, There should be anotheer solution. I guess


if record display the filter in another table…you can use some thing lookl like this…

you can write a cutome query on filter




                'filter'=>GxHtml::listDataEx(User::model()->findAll('user_type=\'venue\''), 'id', 'fullname'),


Note: i hope your model reolation are proper

I am new to YII, Can you explain the above code, what is ValueEx, listataEx and so

it did not work though for me.