Posted on: 2/19/2015 3:16:15 AM | Views : 510

i making a shopping cart in form of data grid view when i try to delete a row nothing happen
the source of the datable is the grid-view
and i am sure that Cells[3] contain the proid
here is the code
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e) { DataTable tbl; if(Session["cart"]!=null){ tbl = (DataTable)Session["cart"]; DataRow row= tbl.Rows.Find(GridView1.Rows[e.RowIndex].Cells[3]); if (row != null) row.Delete(); Session["cart"] = tbl; GridView1.DataSource = tbl; GridView1.DataBind(); }

Go to the complete details ...