C# Adding a Datatable to a Datatable
<p>I know that sounds really weird, but I am fairly new to C# and I am hoping you guys can help me out.</p>

<p>I am looping thru a DataTable, then excute a qry and get the the result into a DataTable.</p>

<p>Works OK for one record, but as soon as there are more records, only the last record is in the DT, which makes sense, I just do not know how to fix it. I need to have all the records in the DT.</p>

<p>Here is my code, any suggestions are welcome....</p>

<blockquote>
<pre><code>    DataTable dt = ml.getRegistration();
    DataTable dt2 = new DataTable();

    foreach (DataRow row in dt.Rows)
    {     
        dt2 = ml.getRegistrationExport(row["ID"]);

    }
    GridView1.DataSource = dt2;
    GridView1.DataBind();
</code></pre>
</blockquote>
