Cannot Parse Variables from RowEditing to RowUpdating
<p>I am having trouble getting the values of public variables <strong>file</strong> and <strong>desc</strong> set on the <strong>RowEditing</strong> method.</p>

<p>I have put a break-point at the end of the <strong>RowEditing</strong> and i can see that the <strong>file</strong> and <strong>desc</strong> values are being set, but when i click on <strong>Update</strong> these values on RowUpdating are being set back to <strong>""</strong>.</p>

<p>The gridDok.Rows[e.RowIndex].Cells[4].Text is also being set to <strong>""</strong> and i get the <strong>ArgumentExceprion</strong>:</p>

<p><strong>String cannot be of zero length.
Parameter name: oldValue</strong></p>

<p>Does anyone have a suggestion?</p>

<p>Here is the code of the methods:</p>

<pre><code>protected void gridDok_RowEditing(object sender, GridViewEditEventArgs e)
{
    file = gridDok.Rows[e.NewEditIndex].Cells[5].Text;
    desc = gridDok.Rows[e.NewEditIndex].Cells[4].Text;
}

protected void gridDok_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
    string file1 = file.Replace(desc, gridDok.Rows[e.RowIndex].Cells[4].Text);
    File.Move("~/" + file, "~/" + file1);
}
</code></pre>

<p>Thanks in advance.</p>
