gridview and url

i have problem with gridview and url.

when i filter data in gridview, the page refresh and url change into this.




http://192.168.1.118/yii_paneledit/nxm_panel/index.php?r=AdsBanner%2Findex&AdsBanner[name]=&AdsBanner[date_created]=123&AdsBanner[status]=&AdsBanner_page=1



i don’t know how, but instead should be like this?




http://192.168.1.118/yii_paneledit/nxm_panel/index.php



i don’t know what part i change…

can sameone help me??

sorry, my english is not so good…

Hi

You have a to change form method from _search file

change " GET " to " POST "

Thanks

not from _search…

i filter data in gridview in form admin.php

In your admin view, you must use the same ‘id’ in the Ajax call and the grid widget, like this:


Yii::app()->clientScript->registerScript('search', "

…

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

    $.fn.yiiGridView.update('some-grid', { // <- Here's the ID that will be updated

        data: $(this).serialize()

    });

    return false;

});

");

?>

…

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

    'id'=>'some-grid', // See? Same ID

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

    'filter'=>$model,

    'columns'=>array(

    …



problem solved…




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

	'id'=>'ads-banner-grid',

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

	'filter'=>$model,

	'afterAjaxUpdate' => 'js:function(id, data) {assignPrettyPhoto();}', <-- i change like this..(because i use jpretty photo)

 //     'ajaxUpdate'=>false,  <-- this is make url not good if i use filter in gridview

//      'ajaxUpdate'=>true,  <-- this is make jprettyphoto not work after i use filter in gridview

	'columns'=>array(

		array(

	          'class'=>'CButtonColumn',

		  'template'=>'{view}',

		  'viewButtonUrl'=>'Yii::app()->createUrl("/adsBanner/view", array("id" => $data->id_ads_banner,"action"=>"all"))."?iframe=true&width=800&height=510"',

		  'viewButtonOptions'=>array('rel'=>'prettyPhoto'),


		),

		'id_ads_banner',




thanks for all for fast reply