How to edit value of cell in DataGridView binded to DataTable?
<p>I've got some problem with my application: there is a DataGridView binded to DataTable, and code for editing:</p>

<pre><code>Person person=new Person();
            person.name = dataGridViewPersons.CurrentRow.Cells[0].Value.ToString();
            person.faculty = dataGridViewPersons.CurrentRow.Cells[1].Value.ToString();
            person.course = dataGridViewPersons.CurrentRow.Cells[2].Value.ToString();
            person.group = dataGridViewPersons.CurrentRow.Cells[3].Value.ToString();
            person.sex = dataGridViewPersons.CurrentRow.Cells[4].Value.ToString();
            person.nationality = dataGridViewPersons.CurrentRow.Cells[5].Value.ToString();
            person.date = dataGridViewPersons.CurrentRow.Cells[6].Value.ToString();

            person.writingHand = dataGridViewPersons.CurrentRow.Cells[7].Value.ToString();
            person.throwingHand = dataGridViewPersons.CurrentRow.Cells[8].Value.ToString();
            person.cuttingHand = dataGridViewPersons.CurrentRow.Cells[9].Value.ToString();
            person.takingBrushHand = dataGridViewPersons.CurrentRow.Cells[10].Value.ToString();
            person.takingMatch = dataGridViewPersons.CurrentRow.Cells[11].Value.ToString();
            person.sweepingHand = dataGridViewPersons.CurrentRow.Cells[12].Value.ToString();
            person.takingHummerHand = dataGridViewPersons.CurrentRow.Cells[13].Value.ToString();
            person.takingRacketHand = dataGridViewPersons.CurrentRow.Cells[14].Value.ToString();
            person.takingNeedleHand = dataGridViewPersons.CurrentRow.Cells[15].Value.ToString();
            person.openingBankHand = dataGridViewPersons.CurrentRow.Cells[16].Value.ToString();
            person.takingShoverHand = dataGridViewPersons.CurrentRow.Cells[17].Value.ToString();
            person.doingHairsHand = dataGridViewPersons.CurrentRow.Cells[18].Value.ToString();

            person.legToLeg = dataGridViewPersons.CurrentRow.Cells[19].Value.ToString();
            person.stepForwardLeg = dataGridViewPersons.CurrentRow.Cells[20].Value.ToString();
            person.jumpingUpLeg = dataGridViewPersons.CurrentRow.Cells[21].Value.ToString();
            person.kickingLeg = dataGridViewPersons.CurrentRow.Cells[22].Value.ToString();

            person.takingWatchEar = dataGridViewPersons.CurrentRow.Cells[23].Value.ToString();
            person.soundingEar = dataGridViewPersons.CurrentRow.Cells[24].Value.ToString();
            person.takingPhoneEar = dataGridViewPersons.CurrentRow.Cells[25].Value.ToString();

            person.closingEar = dataGridViewPersons.CurrentRow.Cells[26].Value.ToString();
            person.takingPencilEar = dataGridViewPersons.CurrentRow.Cells[27].Value.ToString();
            person.takingKaleidoscope = dataGridViewPersons.CurrentRow.Cells[28].Value.ToString();
        FormPersonActivity form = new FormPersonActivity(person);
        if (form.ShowDialog() == DialogResult.OK)
        {
            fillDataRow(table.Rows[dataGridViewPersons.CurrentRow.Index], form.GetPerson());
        }
</code></pre>

<p>And the following function for filling:</p>

<pre><code>private void fillDataRow(DataGridViewRow row, Person person)
{
    row.Cells[0].Value = person.name;
    row.Cells[1].Value = person.faculty;
    row.Cells[2].Value = person.course;
    row.Cells[3].Value = person.group;
    row.Cells[4].Value = person.sex;
    row.Cells[5].Value = person.nationality;
    row.Cells[6].Value = person.date;
    row.Cells[7].Value = person.writingHand;
    row.Cells[8].Value = person.throwingHand;
    row.Cells[9].Value = person.cuttingHand;
    row.Cells[10].Value = person.takingBrushHand;
    row.Cells[11].Value = person.takingMatch;
    row.Cells[12].Value = person.sweepingHand;
    row.Cells[13].Value = person.takingHummerHand;
    row.Cells[14].Value = person.takingRacketHand;
    row.Cells[15].Value = person.takingNeedleHand;
    row.Cells[16].Value = person.openingBankHand;
    row.Cells[17].Value = person.takingShoverHand;
    row.Cells[18].Value = person.doingHairsHand;
    row.Cells[19].Value = person.legToLeg;
    row.Cells[20].Value = person.stepForwardLeg;
    row.Cells[21].Value = person.jumpingUpLeg;
    row.Cells[22].Value = person.kickingLeg;
    row.Cells[23].Value = person.takingWatchEar;
    row.Cells[24].Value = person.soundingEar;
    row.Cells[25].Value = person.takingPhoneEar;
    row.Cells[26].Value = person.closingEar;
    row.Cells[27].Value = person.takingPencilEar;
    row.Cells[28].Value = person.takingKaleidoscope;
    row.Cells[29].Value = person.mainHand;
    row.Cells[30].Value = person.mainLeg;
    row.Cells[31].Value = person.mainEar;
    row.Cells[32].Value = person.mainEye;
}
</code></pre>

<p>So, it code works good, but if I tap by column in DataGridView for sorting, it code won't work - user editing some row, but instead of edited value he will get a new row with new value which follows to the old row, i.e. we have 2 rows! Please, help me. </p>
