title: Using ArrayDataProvider in Yii2 gridview and id in actions
body: <p>I want to use arrayDataProvider in gridview in yii2. I have followed this question:</p>
  
  <p><a href="https://stackoverflow.com/questions/24848585/using-yii2s-gridview-with-a-normal-array-of-data">Using yii2&#39;s gridview with a normal array of data</a></p>
  
  <p>now my array is displayed in the gridview but the id parameter in delete/edit/view link in the grid is the index of data in array which is not valid id.</p>
  
  <p>How can I pass the real id to these actions?</p>
  
  <hr>
  
  <p>Edited:</p>
  
  <p>My sample array is like this:</p>
  
  <pre><code>$data = [
           23 =&gt; [
                  'id' =&gt; 4,
                  'title'=&gt;'mark',
                  'parentName'=&gt; '21',
                  'description'=&gt; '190 cm'],
           18 =&gt; [
                  'id'=&gt;6, 
                  'title'=&gt;'aaa',
                  'parentName'=&gt; 50,
                  'description'=&gt; '190 cm'],
           40 =&gt; [
                  'id'=&gt; 8, 
                  'title'=&gt;'nnn',
                  'parentName'=&gt; '34',
                  'description'=&gt; '190 cm'],
              ];
  </code></pre>