title: Reload only gridview in yii2
body: <p>How can I, reload only <strong>grid-view</strong> on <strong>on change</strong> event of drop-down in Yii2? </p>
  
  <p>I know that it can be done via pjax but not sure where and how to use the code.</p>
  
  <p>I am using <strong>Ajax request</strong> for communicating with controller. Here is the ajax code:-</p>
  
  <pre><code>function loadGrid(level) { 
      alert(level); 
      $.ajax({ 
          type: 'GET', 
          url: 'index.php?r=villagedata/level', 
          data: {level:level}, 
          success: function(data) 
          { 
              alert("Success"); 
              $.pjax({container: '#myview'}); 
          } 
      }); 
  } 
  </code></pre>
  
  <p>I wan't my grid to reload when the <strong>Ajax Request</strong> returns success message.</p>
  
  <p>Thank You.</p>