How to using GetChanges() in DataTable
<p>I have been developing some application with DataGridView binded to DataTable. So, now I need to do 1 thing: user can edit some fields, and when he clicks by "Save" the application must change some fields programmatically. I'm trying to use this code, but it doesn't work:</p>

<pre><code>private void toolStripMenuItemSaveChanges_Click(object sender, EventArgs e)
{   
    try
    {
        dataGridViewPersons.BindingContext[table].EndCurrentEdit();
        //
        DataTable changes = table.GetChanges();
        if (changes != null)
        {
            Console.WriteLine("edited rows=" + table.GetChanges().Rows.Count);

            foreach (DataRow row in changes.Rows)
            {
                row[29] = getRightBody(row, 7, 18);
                row[30] = "-";
                row[31] = getRightBody(row, 23, 25);
                row[32] = getRightBody(row, 26, 28);
            }
        }
        else
        {
            Console.WriteLine("edited rows=0");
        }

        adapter.Update(table);              
    }
    catch (Exception exeption)
    {
        this.Text = exeption.Message;
    }
}
</code></pre>

<p>If there is edited rows, this code won't change fields in the binded DataTable; I thought that GetChanges() return DataTable with relations to the original DataTable, but now I know it's false. Please, tell me the decision. Thank you in advance. </p>
