title: CgridView ajax pagination in popup window
body: <p>in my project i am populating a cgridview data to a popup in my base window. but when i tried doing ajax pagination it gets fails. i have made a view named list invoices having the cgrid data only.</p>
  
  <p><strong>view/user/listInvoices.php</strong></p>
  
  <pre><code>&lt;div id="invoice_container" name="invoice_container"&gt;
  &lt;div align="right"&gt;&lt;img src="&lt;?php echo Yii::app()-&gt;request-&gt;baseUrl; ?&gt;/media/images/add_button.png" name="add_invoice" id="add_invoice"&gt;&lt;/div&gt;
  &lt;?php
  echo "INVOICES LISTING";
  // &lt;a href="&lt;?php #echo Yii::app()-&gt;createAbsoluteUrl('/studio/addInvoices') "&gt;Add Invoice&lt;/a&gt;
  //echo $schedules;
  ?&gt;
  &lt;?php
  $this-&gt;widget('zii.widgets.grid.CGridView', array(
      'dataProvider' =&gt; $invoice-&gt;search($studioId),
      'columns' =&gt; array(
          array(
              'name' =&gt; 'Invoice Number',
              'type' =&gt; 'raw',
              'value' =&gt; '$data-&gt;invoice_no',
          ),
          array(
          'name' =&gt; 'Student',
          'type' =&gt; 'raw',
          'value' =&gt; '$data-&gt;user_id',
          ),
          array(
              'name' =&gt; 'Invoice Date',
              'type' =&gt; 'raw',
              'value' =&gt; '$data-&gt;invoice_date',
          ),
          array(
              'name' =&gt; 'Invoice Amount',
              'type' =&gt; 'raw',
              'value' =&gt; '$data-&gt;invoice_amount',
          ),
          array(
              'name' =&gt; 'Status',
              'type' =&gt; 'raw',
              'value' =&gt; '$data-&gt;invoice_status',
          ),
      ),
  ));
  ?&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>in my controller</p>
  
  <p>on the baseview.php i send a request to the user controller to load invoice. an the ajax return success with the data a populate the grid onto the invoice controller grid.</p>
  
  <p><strong>view/user/baseview.php</strong></p>
  
  <pre><code>$.ajax({
   url:loadinvoice,
   success: function(data) { $('#invoice_controller).html(data);}
  });
  </code></pre>
  
  <p><strong>usercontroller.php</strong></p>
  
  <pre><code>public function actionLoadinvoice() {
   $this-&gt;renderPartial('listinvoices');
  }
  </code></pre>
  
  <p>but in my div the grid gets populated by the ajax pagination is not working. when i click the next page the browser gets reloaded. whats is the issue behind this. i think i need to bind the ajax pagination property in .bind() or .live(). but how can i do that.</p>