Grid filter - need update method

Hello,

I need to apply a filter to a grid view but must be an external field and not one of the filters that appear in the grid view itself.

What is the method that is invoked when using the filters on the grid?

Thanks


$('.search-form form').submit(function(){

	$.fn.yiiGridView.update('vehicle-offer-grid', {

		data: $(this).serialize()

	});

	return false;

});

Is some of the generated JS on one of my pages.

If you talk about CGridView, You need update method search() in your model class.

Also, you can change the columns, which will be rendered in CGridView:




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

	'id'=>'client-grid',

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

	'filter'=>$model,

	'columns'=>array(

		

        array( //your column

	'name'=>'some_property',//property in your model

	'value'=>'$data->some_property',//value that will be show in your gridview column

        'filter'=> CHtml::listData(ModelClass::model()->findAll(), 'what_sends_to_method_search', 'what_shows')//filter - in this example - list of values

        ),

	array(

		'class'=>'CCheckBoxColumn',

                'selectableRows'=>2,

		),

        array(

		'class'=>'CButtonColumn',

        ),

	),

)); ?>



Thanks, from what I managed to get what I want