Reload Page When We Filter Data


Excuse me in advance for my English, I have difficulty expressing myself.

I have a problem with the load time a page. In a page, I have two CGridView, one with few data and a other with many data ( load time of this gridview is 1 minute minimum).

When I made a filter in first gridview, the page load fully, it is a problem for me.

it is possible to charge only first gridview, in order do not wait for 1 minutes.

Can we modify the framework when we filter for don’t recharge fully page, but only the part concerned.

Thanks in advance,

Hi and welcome to Yii!

CGridView by default uses ajax method, so page shouldn’t load entirely

could you post your view code of the two CGridViews ?

First gridview

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



       // 'ajaxUpdate'=>'true',



	a	'f_title',






                        'template'=>'{view} {delete}',




Code call a second gridview

$dataProvider = new CActiveDataProvider('t_esi_site', array(



        'condition'=>"t.f_site_id IN (

        	SELECT DISTINCT f_site_id

        	FROM t_esi_site_node

        	INNER JOIN t_esi_task_exec ON(t_esi_site_node.f_node_id = t_esi_task_exec.f_node_id)

        	LEFT OUTER JOIN t_esi_task_event ON(t_esi_task_exec.f_last_event_id = t_esi_task_event.f_event_id)

        	WHERE t_esi_task_event.f_event != 'TERMINATED' OR t_esi_task_exec.f_last_event_id is NULL








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






    echo CHtml::link("<b>$data->f_site_id</b>",array('/t_esi_site/view&id='.$data->f_site_id));

    $dataProvider=new CActiveDataProvider('t_esi_task_exec', array(

        'data'=> t_esi_task_exec::getTreeOrder(0, $data->f_site_id),


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




                'name'=>'Task Id',







                'header'=>'Server Node',



            array(  'class'=>'CButtonColumn',


                    'viewButtonUrl'=>'Yii::app()->createUrl("/t_esi_task_exec/view", array("id" => $data->f_task_exec_id))',






    if ($nbtask>0)


        echo "And $nbtask dependant task(s) remaining";


Your code seems ok

Trace your request (when check a filter) on tab network of your firebug,

Also check your javascript code (if you added)