title: Copying data from var to DataTable after LINQ query
body: <p>I am using LINQ query to filter data from a datatable and placing the data in to another datatable. For this I am using foreach statement to copy values from var to datatable. The datatable will be containing a very huge no. of rows so can you suggest me a way in which I can do the copying in a single go?</p>
  
  <pre><code>            var drdatedisp = from row in dtfullreport.AsEnumerable()
                               group row by row.Field&lt;string&gt;("Order_Date") into g
                               select new
                               {
                                   Order_Date = g.Key,
                                   totalQnty = g.Sum(a =&gt; a.Field&lt;int&gt;("Item_Quantity")),
                                   totalTax = g.Sum(a =&gt; float.Parse(a.Field&lt;decimal&gt;("TAXAMT").ToString())),
                                   totalAmt = g.Sum(a =&gt; float.Parse(a.Field&lt;decimal&gt;("VALAMT").ToString()))
                               };
              DataTable dtdatedisp = new DataTable();
              dtdatedisp.Columns.Add("Order_Date");
              dtdatedisp.Columns.Add("Item_Quantity");
              dtdatedisp.Columns.Add("TAXAMT");
              dtdatedisp.Columns.Add("VALAMT");
              dtdatedisp.Rows.Clear();
              foreach (var g in drdatedisp)
              {
                  DataRow newRow1 = dtdatedisp.NewRow();
                  newRow1[0] = g.Order_Date;
                  newRow1[1] = g.totalQnty;
                  newRow1[2] = String.Format("{0:0.00}", g.totalTax);
                  newRow1[3] = String.Format("{0:0.00}", g.totalAmt);
                  dtdatedisp.Rows.Add(newRow1);
              }
          }
  </code></pre>
  
  <p>please see that there will be very less no of iterations....</p>
  
  <p>is there any way ?? Can you Help me ??</p>