Devendra  Kumar

Devendra Kumar

  • NA
  • 517
  • 244.4k

grid view inside update panel edit value get old value ?

May 27 2016 2:37 AM
hi friends getting error when update value inside grid view :
 
girdview inside update panel when i click edit button then open popup from with value and when i will update it first time update right but when second time edit another value then it show first value comma second update value
 
 
like first time update :
1. dev to devendra  it update right
but second time i will want update another like
2. rahul to rahul sharma then it show value like:
 
",devendra, rahul sharma" how to solve this problem my code is like:
 
if (e.CommandName == "Cmd_Edit")
{
objadmin.Work_Id = Convert.ToInt32(e.CommandArgument);
ViewState["work_id"] = objadmin.Work_Id;
txt_Feedback.Text = string.Empty;
txt_fee.Text = string.Empty;
DataSet ds = objadmin.bindreport("feedone");
if (ds.Tables[0].Rows.Count > 0)
{
txt_Feedback.Text = ds.Tables[0].Rows[0]["Feedback"].ToString();
txt_fee.Text = ds.Tables[0].Rows[0]["Fee"].ToString();
ModalPopupExtender1.Show();
}
}
 
 
and update butoon code like:
 
 
feedback=txt_Feedback.Text;
objadmin.Work_Id = Convert.ToInt16(ViewState["work_id"].ToString());
fee = txt_fee.Text;
if (txt_Feedback.Text == "")
{
txt_Feedback.Text = "NULL";
}
else
{
objadmin.Feedback = feedback.Replace(",", "");
}
if (txt_fee.Text == ",")
{
objadmin.Fee = 0;
}
else
{
objadmin.Fee = Convert.ToDecimal(fee.Replace(",", ""));
}
DataSet ds = objadmin.bindreport("feedbackupdate");
txt_fee.Text = string.Empty;
txt_fee.Text = "";
txt_Feedback.Text = string.Empty;
txt_Feedback.Text = "";
 
 

Answers (1)