E
esperanza
Hello ASPX expert !!
Here is my problem.
I have a datagrid binded to a dataview.
I edit the datagrid and change the value of my textBoxes from my datagrid.
When I click to update the data,
What I read is the old values (txtProduitVIPNo)
Any Idea??
thanks in advance !!
Esperanza !!
private void dgAdminCommandes_UpdateCommand(object source,
System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
TextBox txtProduitVIPNo = (TextBox)e.Item.FindControl("txtProduitVIPNo");
TextBox txtProduitVIPNom = (TextBox)e.Item.FindControl("txtProduitVIPNom");
this.updCoopCommandes.Parameters["@OrderID"].Value =
dgCoopCommandes.DataKeys[e.Item.ItemIndex];
this.updCoopCommandes.Parameters["@ProduitVIPNo"].Value =
txtProduitVIPNo.Text;
this.updCoopCommandes.Parameters["@ProduitVIPNom"].Value =
txtProduitVIPNom.Text;
this.updCoopCommandes.Parameters["@TMPSTP_ADM"].Value = System.DateTime.Now;
this.sqlConn.Open();
this.updCoopCommandes.ExecuteNonQuery();
this.sqlConn.Close();
}
Here is my problem.
I have a datagrid binded to a dataview.
I edit the datagrid and change the value of my textBoxes from my datagrid.
When I click to update the data,
What I read is the old values (txtProduitVIPNo)
Any Idea??
thanks in advance !!
Esperanza !!
private void dgAdminCommandes_UpdateCommand(object source,
System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
TextBox txtProduitVIPNo = (TextBox)e.Item.FindControl("txtProduitVIPNo");
TextBox txtProduitVIPNom = (TextBox)e.Item.FindControl("txtProduitVIPNom");
this.updCoopCommandes.Parameters["@OrderID"].Value =
dgCoopCommandes.DataKeys[e.Item.ItemIndex];
this.updCoopCommandes.Parameters["@ProduitVIPNo"].Value =
txtProduitVIPNo.Text;
this.updCoopCommandes.Parameters["@ProduitVIPNom"].Value =
txtProduitVIPNom.Text;
this.updCoopCommandes.Parameters["@TMPSTP_ADM"].Value = System.DateTime.Now;
this.sqlConn.Open();
this.updCoopCommandes.ExecuteNonQuery();
this.sqlConn.Close();
}