Ajax Search Not Working With Yiigridview

I have the following form in the view file.

<div class="search-form">

                    <?php $this->beginWidget('CActiveForm', array('id'=>'transaction-detail-form', 'method'=>'get')); ?>


and the following script in the same view file.


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

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

        $('#yw0').yiiGridView('update', {

			data: $(this).serialize()


        return false;




However my grid does not get updated when the form is submitted. No ajax request is also sent. Any idea why this happens?

try this




                 		data: $(this).serialize()



return false;