Alright, so I have a Gridview and added RowEditing and RowUpdating to it, but it won't really edit something.. This is my code for both:

```
protected void UserAccounts_RowEditing(object sender, GridViewEditEventArgs e)
{
     UserAccounts.EditIndex = e.NewEditIndex;
     BindUserAccounts();
}
protected void UserAccounts_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
     int index = UserAccounts.EditIndex;
     GridViewRow row = UserAccounts.Rows[e.RowIndex];
     username = UserAccounts.Rows[e.RowIndex].Cells[1].Text;
     email = ((TextBox)row.Cells[2].Controls[0]).Text;
     MembershipUser user = Membership.GetUser(username);
     if (user != null)
     {
         user.Email = email;
         Membership.UpdateUser(user);
         ActionStatus.Text = string.Format("User {0} details have been successfully updated!", username);
     }
     UserAccounts.EditIndex = -1;
     BindUserAccounts();
}

```

What am I doing wrong in here?

EDIT: This is my BindUserAccounts:

```
private void BindUserAccounts()
{
     int totalRecords;
     UserAccounts.DataSource = Membership.FindUsersByName(this.UsernameToMatch + "%", this.PageIndex, this.PageSize, out totalRecords);
     UserAccounts.DataBind();

     bool visitingFirstPage = (this.PageIndex == 0);
     lnkFirst.Enabled = !visitingFirstPage;
     lnkPrev.Enabled = !visitingFirstPage;

     int lastPageIndex = (totalRecords - 1) / this.PageSize;
     bool visitingLastPage = (this.PageIndex >= lastPageIndex);
     lnkNext.Enabled = !visitingLastPage;
     lnkLast.Enabled = !visitingLastPage;
}

```