protected void gv_RowEditing(object sender, GridViewEditEventArgs e)
        {
            this.gv.EditIndex = e.NewEditIndex;
            BindData();
        }        protected void gv_RowUpdating(object sender, GridViewUpdateEventArgs e)
        {
            this.gv.EditIndex = e.RowIndex;
            int id = int.Parse(this.gv.DataKeys[e.RowIndex].Value.ToString());
            string str = ((TextBox)this.gv.Rows[e.RowIndex].FindControl("txt")).Text.Trim();
  
            this.gv.EditIndex = -1;
            BindData();
        }        protected void gv_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
        {
            gv.EditIndex = -1;
            BindData();
        }