protected void ShoppingCartGrid_RowDeleting(object sender, GridViewDeleteEventArgs e) { int selectedR = e.RowIndex; CartItems.RemoveAt(selectedR); ShoppingCartGrid.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { UserEmail = (string)Session["Email"]; if (String.IsNullOrEmpty(UserEmail)) { btnPurchase.Visible = false; lblNewEmail.Visible = true; txtNewEmail.Visible = true; btnNewEmail.Visible = true; } else { BuyerEmail3 = (string)Session["Email"]; btnPurchase.Enabled = true; lblNewEmail.Visible = false; txtNewEmail.Visible = false; btnNewEmail.Visible = false; } CartItems = (ArrayList)Session["CartSession"]; ShoppingCartGrid.DataSource = CartItems; ShoppingCartGrid.DataBind(); // ShoppingCartGrid.Columns[3].Visible = false; //ShoppingCartGrid.Columns[5].Visible = false; CalculateTotal(); }