How To Add Filter Into Rights Module?

I want to add filtering and sorting into the every cgridview of rights module.

this is the cgridview of rights module


<?php $this->widget('zii.widgets.grid.CGridView', array(

        'dataProvider'=>$dataProvider,

        'template'=>"{items}\n{pager}",

        'emptyText'=>Rights::t('core', 'No users found.'),

        'htmlOptions'=>array('class'=>'grid-view assignment-table'),

        //'filter'=>$dataProvider,

        'columns'=>array(

            array(

                'name'=>'name',

                'header'=>Rights::t('core', 'Name'),

                'type'=>'raw',

                'htmlOptions'=>array('class'=>'name-column'),

                'value'=>'$data->getAssignmentNameLink()',

                //'filter'=>'name',

            ),

            array(

                'name'=>'assignments',

                'header'=>Rights::t('core', 'Roles'),

                'type'=>'raw',

                'htmlOptions'=>array('class'=>'role-column'),

                'value'=>'$data->getAssignmentsText(CAuthItem::TYPE_ROLE)',

            ),

            /*

            array(

                'name'=>'assignments',

                'header'=>Rights::t('core', 'Tasks'),

                'type'=>'raw',

                'htmlOptions'=>array('class'=>'task-column'),

                'value'=>'$data->getAssignmentsText(CAuthItem::TYPE_TASK)',

            ),

            array(

                'name'=>'assignments',

                'header'=>Rights::t('core', 'Operations'),

                'type'=>'raw',

                'htmlOptions'=>array('class'=>'operation-column'),

                'value'=>'$data->getAssignmentsText(CAuthItem::TYPE_OPERATION)',

            ),

            */

        )

    )); ?>

This is the actionview of assignmentcontroller. I added order by criteria.


public function actionView()

	{

		$model = new Users('search');

		// Create a data provider for listing the users

		$dataProvider = new RAssignmentDataProvider(array(

			'pagination'=>array(

				'pageSize'=>50,

			),

			'criteria'=>array(

					//'condition'=>'status=1',

					'order'=>'username ASC',

					//'with'=>array('author'),

			),

		));


		// Render the view

		$this->render('view', array(

			'model'			=> $model,

			'dataProvider'	=> $dataProvider,

		));

	}

if you can add a filter on gridview just one line add on array…you can write a custome query on filter

for e.g


array(

                'name'=>'assignments',

                'header'=>Rights::t('core', 'Roles'),

                'type'=>'raw',

                'htmlOptions'=>array('class'=>'role-column'),

                'value'=>'$data->getAssignmentsText(CAuthItem::TYPE_ROLE)',

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


            ),

I got following error

when I change the filter into following, I got nothing change. everything as same before adding filter into gridview.


'filter'		=> CHtml::listData(Users::model()->findAll(), 'id', 'fullname'),

try this


'filter'=>CHtml::listDataEx(Users::model()->findAll(), 'id', 'fullname'),


'filter' => array('1' => 'Active', '0' => 'Inactive'),

below code try and is working or not please tell me.

errors are disappeared. but no filtering and sorting display. Display gridview, only.