title: How do I refresh grid view in Yii after AJAX using jQuery?
body: <p>I'm trying to refresh the grid, but i get this error:   </p>
  
  <p><strong>TypeError: $.fn.GridView is undefined</strong></p>
  
  <p>This is my js code: </p>
  
  <pre><code>$( document ).ready(function() {
          $("#username_filter").keyup(function( event ) {
              if ($(this).val().length &gt;3){
                  $.ajax({
                      url: "/common/main/filterData/",
                      type: "POST",
                      data: { username : $(this).val() },
                  }).done(function() {
                      $.fn.GridView.update("#yw0");
                  });
              }
          });
      });
  </code></pre>
  
  <p>and this is the view:</p>
  
  <pre><code>.....
  $this-&gt;widget('GridView', array(
          'dataProvider' =&gt; $data,
          //'filter' =&gt; '',
          'itemsCssClass'=&gt;'table',
          'pager' =&gt; array(
                  'class'                 =&gt; 'CLinkPager',
                  'prevPageLabel'         =&gt; 'Previous',
                  'nextPageLabel'         =&gt; 'Next',
                  'header'                =&gt; '',
                  'previousPageCssClass'  =&gt; 'btn btn-info btn-sm',
                  'selectedPageCssClass'  =&gt; 'btn btn-warning btn-sm',
                  'internalPageCssClass'  =&gt; 'btn btn-info btn-sm',
                  'firstPageCssClass'     =&gt; 'btn btn-info btn-sm',
                  'nextPageCssClass'      =&gt; 'btn btn-info btn-sm',
          ),
  ....
  </code></pre>
  
  <p>Maybe it is a noob question, but where is generated the id of the grid ?</p>