title: Yii2 renderAjax nested Listview
body: <p>I am trying to render the listview by ajax but it is giving me the following error:</p>
  
  <pre><code>Exception (Invalid Configuration) &amp;#039;yii\base\InvalidConfigException&amp;#039; with message &amp;#039
  ;The &amp;quot;dataProvider&amp;quot; property must be set.
  </code></pre>
  
  <p><strong>Controller:</strong></p>
  
  <pre><code>public function actionLoadListviewAjax()
  {
       $dataProvider = // call to a function which returns ArrayDataProvider
       return $this-&gt;renderAjax('myview', [ 'dataProvider' =&gt; $dataProvider ]);
  }
  </code></pre>
  
  <p><strong>View:</strong></p>
  
  <pre><code>echo ListView::widget([
          'dataProvider' =&gt; $dataProvider,
          'itemView'     =&gt; 'items',
          'options' =&gt; ['class' =&gt; 'list-view-post'],
          'summary' =&gt; '',
          'emptyText' =&gt; '', 
      ]);
  </code></pre>
  
  <p><strong>$dataProvder:</strong></p>
  
  <pre><code>&lt;pre&gt;yii\data\ArrayDataProvider Object
  (
      [key] =&gt; 
      [allModels] =&gt; Array
          (
              [0] =&gt; Array
                  (
                      [RecommendationCategory] =&gt; 
                      [ID] =&gt; 37
                      [GUID] =&gt; 
                      [Title] =&gt; test
                      [WallPostTypeID] =&gt; 1
                      [RecommendationCategoryID] =&gt; 0
                      [CommentsJSON] =&gt; 
                      [TotalComments] =&gt; 
                      [PostedMessage] =&gt; test
                      [FirstName] =&gt; test
                      [LastName] =&gt; test
                      [ProfileImagePath] =&gt; Lighthouse.jpg
                      [AddedOn] =&gt; 2015-07-18 15:14:06
                      [ImagePath] =&gt; 
                      [CommentProfileImagePath] =&gt; 
                      [IsSubscribe] =&gt; 1
                  )
  
          )
  
      [id] =&gt; 
      [_sort:yii\data\BaseDataProvider:private] =&gt; 
      [_pagination:yii\data\BaseDataProvider:private] =&gt; 
      [_keys:yii\data\BaseDataProvider:private] =&gt; 
      [_models:yii\data\BaseDataProvider:private] =&gt; 
      [_totalCount:yii\data\BaseDataProvider:private] =&gt; 
      [_events:yii\base\Component:private] =&gt; Array
          (
          )
  
      [_behaviors:yii\base\Component:private] =&gt; 
  )
  </code></pre>
  
  <p>I tried renderPartial also but still the same error. Any ideas why it is giving the exeption?</p>
  
  <p><strong>Update:</strong></p>
  
  <p>In my itemView file <code>items</code> I have another listview for which it is giving the exception.</p>