Hi, You almost have it right.
Make sure you define all the columns before you fill any cells.
So
for (int i = 0; i < gv1.HeaderRow.Cells.Count; i++)
{
dt.Columns.Add(gv1.HeaderRow.Cells[i].Text);
}
is good
then also add the column names for the 3 textboxes
the section where you fill the cells is also good just add code where you fill the cells for the columns associated with the textboxes.