Selecting Edit on row returns wrong row after sorting
<p>I am currently setting my GridView AllowSorting = true.  The sorting works fine, but when I click on the edit button for a specific row after sorting, the wrong row gets returned.  It edits the row that was previously in the position of the current row before sorting.</p>

<p>Here is my code in the Sorting event.</p>

<pre><code>string sortExpression = e.SortExpression;
            string direction = string.Empty;
            if (SortDirection == SortDirection.Ascending)
            {
                SortDirection = SortDirection.Descending;
                direction = " DESC";
            }
            else
            {
                SortDirection = SortDirection.Ascending;
                direction = " ASC";
            }

            DataTable table = Session["WebUserDT"] as DataTable;

            table.DefaultView.Sort = sortExpression + direction;
            grdWebUser.DataSource = table;
            grdWebUser.DataBind();
</code></pre>

<p>Any idea how to solve this?              </p>
