title: Cast error when binding a nested grid view to a gridview bound on the linq data result
body: <p>I have a parent grid view (UserTransactionGridView) which i'm binding with the output from this linq query for which the output looks like this: 
  <a href="http://postimage.org/image/1vtpbagck/" rel="nofollow">http://postimage.org/image/1vtpbagck/</a>:</p>
  
  <pre><code>        var recordList = (from CustomersRecord custsRecord in customerRecordContainer orderby custsRecord.DateOfTransaction descending group custsRecord 
                            by new {custsRecord.InvoiceNumber, custsRecord.DateOfTransaction} into intermediateResult 
                            select new {InvoiceNumber = intermediateResult.Key.InvoiceNumber, DateOfTransaction = intermediateResult.Key.DateOfTransaction, TotalAmount = intermediateResult.Sum(custsRecord =&gt; custsRecord.TotalAmount)}).ToList();
          UserTransactionGridView.DataSource = recordList;
          UserTransactionGridView.DataBind();  
  </code></pre>
  
  <p>and now when the data is getting bound to each row in parent grid view i'm creating a child grid view (gridview2) depending upon the each rows invoice number. I mean depending upon each row's invoice number i'm fetching the software titles from database and binding it to child grid view in this manner. My intention is to have output like this: <a href="http://postimage.org/image/2lri4f544/" rel="nofollow">http://postimage.org/image/2lri4f544/</a>. And i'm doing the following to achieve this:</p>
  
  <pre><code> protected void UserTransactionGridView_RowDataBound(Object sender, GridViewRowEventArgs e)
      {
          if (e.Row.RowType == DataControlRowType.DataRow)
          {
              GridView gridView2 = (GridView)e.Row.FindControl("gridView2");
              System.Data.DataRowView dr = (System.Data.DataRowView)e.Row.DataItem;
              gridView2.AutoGenerateColumns = true;
              String x = dr[1].ToString();
              softwareTitlesList = SoftwareListRetrieve();
              ArrayList titles = new ArrayList();
              foreach (SoftwareTitles softwareTitle in softwareTitlesList)
              {
                  if (softwareTitle.InvoiceNumber.Contains(x))
                      titles.Add(softwareTitle.SoftwareTitle);
              }
              gridView2.DataSource = titles;
              gridView2.DataBind();
              softwareTitlesList.Clear();
          }
      }
  </code></pre>
  
  <p>But I'm getting an error as follows:</p>
  
  <pre><code>Unable to cast object of type '&lt;&gt;f__AnonymousType3`3[System.String,System.DateTime,System.Decimal]' to type 'System.Data.DataRowView'.
  </code></pre>