gridview and url

i have problem with gridview and url.

when i filter data in gridview, the page refresh and url change into this.[name]=&AdsBanner[date_created]=123&AdsBanner[status]=&AdsBanner_page=1

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

i don’t know what part i change…

can sameone help me??

sorry, my english is not so good…


You have a to change form method from _search file

change " GET " to " POST "


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





problem solved…

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




	'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





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




thanks for all for fast reply