i didnt get any error in runtime. but updation event not working.... So Please help me to recover this problem..
Default.aspx.cs
----------------
protected void grdv_RowEditing(object sender, GridViewEditEventArgs e)
{
grdvCustomer.EditIndex = e.NewEditIndex;
bind();
}
protected void Grdv_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
{
grdvCustomer.EditIndex = -1;
bind();
}
protected void grdv_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
// Response.Write("");
GridViewRow row = (GridViewRow)grdvCustomer.Rows[e.RowIndex];
Label lbl = (Label)row.FindControl("lblComId");
TextBox txtCmt = (TextBox)row.FindControl("txtComments");
DropDownList drpfdb = (DropDownList)row.FindControl("drpFeedback");
DropDownList drpStat = (DropDownList)row.FindControl("drpStatus");
conn.Open();
SqlCommand cmd = new SqlCommand("update compliants set status='" + drpStat.SelectedItem.Text + "',comments='" + txtCmt.Text + "' ,feedback ='" + drpfdb.SelectedItem.Text + "'where comid='" + lbl.Text + "'", conn);
cmd.ExecuteNonQuery();
grdvCustomer.EditIndex = -1;
conn.Close();
bind();
}
public void bind()
{
conn.Open();
SqlDataAdapter da = new SqlDataAdapter("select * from compliants where customerid='" + lblCusAns.Text + "' ", conn);
DataSet ds = new DataSet();
da.Fill(ds, "compliants");
grdvCustomer.DataSource = ds.Tables[0].DefaultView;
grdvCustomer.DataBind();
conn.Close();
}
protected void grdv_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
grdvCustomer.PageIndex = e.NewPageIndex;
bind();
}
Source Code
-------------
BorderColor="#999999"
BorderStyle="Solid"
BorderWidth="1px"
CellPadding="3"
ForeColor="Black"
GridLines="Vertical"
AutoGenerateColumns="False"
OnRowEditing="grdv_RowEditing "
OnRowCancelingEdit="Grdv_RowCancelingEdit"
OnRowUpdating="grdv_RowUpdating"
OnPageIndexChanging="grdv_PageIndexChanging" >

Krishna GaradRank #191 · 12.8K reputationPosted May 19, 2011, 1:19 AM EDT
Posted May 19, 2011, 1:21 AM EDT
Santhonabin44 reputationPosted May 19, 2011, 7:38 PM EDT
Ankit NandekarRank #703 · 3.4K reputationPosted May 19, 2011, 8:49 PM EDT
SqlCommand cmd = new SqlCommand("update compliants set status='" + drpStat.SelectedItem.Text + "',comments='" + txtCmt.Text + "' ,feedback ='" + drpfdb.SelectedItem.Text + "'where comid='" + lbl.Text + "'", conn);
if u r getting value in txt.cmt and lbl.Text then check postback.
Santhonabin44 reputationPosted May 23, 2011, 1:01 AM EDT
i used break point, but while running controls not move into that update function..... and also not have error in that... Please help to recover this problem
Ankit NandekarRank #703 · 3.4K reputationPosted May 23, 2011, 1:10 AM EDT
send me ur both files i will design and cs i will check it.
Suthish NairRank #92 · 22.8K reputationPosted May 23, 2011, 9:53 AM EDT
msdn