I have a gridview with a onrowdeleting="SellersGridView_RowsDeleting"
switch.
My method is:
protected void SellersGridView_RowsDeleting(object sender, GridViewDeleteEventArgs e)
{
string seller = ((Label)SellersGridView.Rows[e.RowIndex].Cells[0].FindControl("TextBoxSeller")).Text;
BookStore b = new BookStore();
b.LoadFromXML(Server.MapPath("list.xml"));
string ISBN = Request.QueryString["ISBN"].ToString();
int ID = b.BooksList.FindIndex(x => x.ISBN == ISBN);
Book myBook = b.BooksList[ID];
myBook.RemoveSeller(seller);
Response.Redirect("editbook.aspx?ISBN=" + ISBN);
}
Well, it seems that when I try to delete anything - nothing happens. I tried to change the first line to Response.Redirect("foo")
just to check if the event itself is fired, and it turns out that it doesn't. I can't get The reason.
Here is my gridview control: http://pastebin.com/CKDAMECT Here is my codebehind code: http://pastebin.com/ShBtwGEu
Thank you very much!