TbGridView filtering not working as expected on drop down menus

I am trying to get the filtering working using the TbGridView in Yii 1.x (an old version I know but it is what we are using)

I using the TbGridView extension with my tabular data, with dropdowns to allow for filtering rows. Here is my (partial) view :-




<?php

    $myuser = new Myuser('search');

    $filterBtn = $this->widget('bootstrap.widgets.TbButton', array(

        'icon'			=> 'filter',

        'size'			=> 'small',

        'label'			=> $myuser->paging ? 'View All' : 'View Less',

        'htmlOptions' 	=> array('class'=>'pull-right', 'style'=> 'margin:20px 0;'),

        'url'			=> $myuser->paging ? array('/carrot/myuser/admin/paging/0') : array('/carrot/myuser/admin')

    ), true);

?>

<?php $this->widget('bootstrap.widgets.TbGridView',array(

    'id'				=> 'myuser-grid','type'=>'striped bordered condensed',

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

    'filter'			=> $myuser,

    'columns'			=> array(

        array(

            'id' => 'user_id',

            'class' => 'CCheckBoxColumn',

            'checked' => 'in_array($data->user_id, $this->grid->owner->model->student_ids)',

            'checkBoxHtmlOptions' => array(

                'name' => 'selected_student_id[]',

            )

        ),

        'firstname',

        'surname',

        'username',

        array(

            'name' 	=> 'year_id',

            'filter'	=> CHtml::activeDropDownList($myuser, 'year_id', CHtml::listData(Organisation::model()->distinctYears, 'year_id', 'year_id'), array('prompt'=>'All Years')),

            'htmlOptions' => array('style' => 'text-align:center;'),

            'headerHtmlOptions' => array('style' => 'text-align:left;'),

        ),

        array(

            'name' => 'form_name',

            'header' => 'Form',

            'filter' => CHtml::activeDropDownList($myuser, 'form_name', CHtml::listData(Organisation::model()->distinctForms, 'form_name', 'form_name'), array('prompt'=>'All Forms')),

        ),

        array(

            'name' 	=> 'House',

            'filter'	=> CHtml::activeDropDownList($myuser, 'House', CHtml::listData(Organisation::model()->distinctHouses, 'House', 'House'), array('prompt'=>'All Houses')),

        ),

    ),

)); ?>



The model uses the search() function shown below:-




public function search($limit = false)

{

    $criteria = new CDbCriteria();


    $criteria->compare('t.user_id',$this->user_id,true);

    $criteria->compare('t.firstname',$this->firstname,true);

    $criteria->compare('t.surname',$this->surname,true);

    $criteria->compare('t.username',$this->username,true);

    $criteria->compare('t.year_id',$this->year_id);

    $criteria->compare('t.form_name',$this->form_name);

    $criteria->compare('t.House',$this->House);

    $criteria->compare('o.organisation_id',$this->organisation_id);


    $criteria->group = 't.user_id';

    $criteria->together = true;


    return new CActiveDataProvider($this->currentUserOrganisation(), array(

        'criteria'      => $criteria,

        'pagination' => array(

            'pageSize' => $this->paging ? ($limit) ? $limit : OverviewController::PAGE_SIZE : 2000

        ),

        'sort'          => array(

            'defaultOrder'  => array('firstname'=>false, 'surname'=>false),

            'attributes'    => array(

                'organisation_name' => array(

                    'asc'       => 'organisation_name',

                    'desc'      => 'organisation_name DESC',

                    'default'   => 'desc',

                ),

                '*'

            )

        ),

    ));

}



The filtering works when I click the header column instelf, however if I try to filter via the dropdown menu’s nothing happens - any ideas?

P.S Note the view is within a partial if that makes any difference