Question: I have a `DataGridView` binded to a `DataTable` (`DataTable` binded to database). I need to add a `DataRow` to the `DataTable`. I'm trying to use the following code:

```
dataGridViewPersons.BindingContext[table].EndCurrentEdit();
DataRow row = table.NewRow();

for (int i = 0; i < 28; i++)
{
    row[i] = i.ToString();
}

```

But it doesn't work, `DataGridView` has never been added a new row. Please, tell me, how can I fix my code? 

Thank you in advance.

Answer: 
//َCreating a new row with the structure of the table:

```
DataTable table = new DataTable();
DataRow row = table.NewRow();
table.Rows.Add(row);

```

//Giving values to the columns of the row(this row is supposed to have 28 columns):

```
for (int i = 0; i < 28; i++)
{
    row[i] = i.ToString();
}

```
If need to copy from another table then need to copy structure first:

```
DataTable copyDt = existentDt.Clone();
copyDt.ImportRow(existentDt.Rows[0]);

```