Example #1
0
 protected void GridView2_RowUpdating(object sender, GridViewUpdateEventArgs e)
 {
     mShoppingBag = (ShoppingBag)Session["mShoppingBag"];
     ProductInBag product = new ProductInBag();
     GridViewRow row = GridView2.Rows[e.RowIndex];
     product.ProdID = int.Parse(row.Cells[0].Text);
     product.Quantity = short.Parse(((TextBox)row.Cells[2].Controls[0]).Text);
     mShoppingBag.UpdateProduct(product);
     Session["mShoppingBag"] = mShoppingBag;
     GridView2.EditIndex = -1;
     populate_GridView2();
 }