CGridView

[font="Verdana"]

Hello,

Is there a way to change method of passing params of CGridView?

It is passing by GET, want to change it by POST.

I have used"‘ajaxUpdate’=>false,".

Please Help me !!

[/font]

Hi,

use "options" in beforeAjaxUpdate

[font="Verdana"]Thanks for the reply.

I have searched related to your suggestion, but didn’t get anything… So can u give me any example for this?[/font]




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

    'id' => 'user-grid',

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

    'filter' => $user,

    'columns' => array(

        ......

    ),

    'beforeAjaxUpdate'=>'function(id,options){ options["type"]="POST"; }',

));



[font="Verdana"]tried but not working, following is my code, is this proper?[/font]


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

	'id'=>'search-grid',

	'dataProvider'=>$smodel->searchResultSql('0'),

	'showTableOnEmpty'=>false,

	'ajaxUpdate'=>false,

	'beforeAjaxUpdate'=>'function(id,options){ options["type"]="POST"; }',

	'columns'=>array(

		array(

			'name'=>'E_NAME',

			'header'=>'Employee',

			'type'=>'raw',

			'value'=>'$data["E_NAME"]',

			'sortable'=>'true',

		),		

));

Try to remove this line :


'ajaxUpdate'=>false,

Thanks, It’s Working Fine !!!