Try this and let me know if it does not work
protected void GView_RowEditing(object sender, GridViewEditEventArgs e)
{
Form_Enable();
GView.EditIndex = e.NewEditIndex;
/provide the index of UID column in your gridview for cell array/
String UID= GView.Rows[e.NewEditIndex].Cells[1].Text;
String cmdStr = String.Format("Select * from UserInfo Where UserID = '{0}' ", UID);
string conStr = ConfigurationManager.ConnectionStrings["CStringCRM"].ToString();
using (SqlConnection conn = new SqlConnection(conStr))
using (SqlCommand cmd = new SqlCommand(cmdStr, conn))
{
conn.Open();
using (SqlDataReader dr = cmd.ExecuteReader(CommandBehavior.CloseConnection))
{
if (dr.Read())
{
txtUID.Text = Convert.ToString(dr["UID"]);
txtFName.Text = Convert.ToString(dr["UFName"]); txtMName.Text = Convert.ToString(dr["UMName"]);
txtLName.Text = Convert.ToString(dr["ULName"]); txtUNic.Text = Convert.ToString(dr["UNic"]);
txtUDob.Text = Convert.ToString(dr["UDOB"]); txtUHPhone.Text = Convert.ToString(dr["UHPhone"]);
txtUCNumber.Text = Convert.ToString(dr["UCPhone"]); txtUEmail.Text = Convert.ToString(dr["UEmail"]);
ddlUState.Text = Convert.ToString(dr["UState"]);
txtUCity.Text = Convert.ToString(dr["UCity"]);
txtUAddress.Text = Convert.ToString(dr["UAddress"]);
// txtUComName.Enabled = true; txtUDesignation.Enabled = true; txtWPhone.Enabled = true; txtFaxNumber.Enabled = true; txtBCity.Enabled = true; txtCAddress.Enabled = true;
// txtECName.Enabled = true; txtECMNumber.Enabled = true; txtRelationship.Enabled = true; txtRHPhone.Enabled = true; txtECMNumber.Enabled = true;
//ddlUState.Text = Convert.ToString(dr["UState"]);
DateTime GV_date = DateTime.Now;
txtUDob.Text = GV_date.ToShortDateString();
this.GView.Visible = false;
txtFName.Focus();
this.btnUpdate.Enabled = true; this.btnShow.Enabled = false; this.btnSave.Enabled = false; this.btnAdd.Enabled = false; this.btnCancel.Enabled = true; this.btnClear.Enabled = false;
}
}
}