/* function delete use GetCheckedRow() from utility to get checked row id for gride */ protected void btnDelete_Click(object sender, EventArgs e) { string StrBreedID = Utility.GetCheckedRow(gdvBreed, "chkSelect"); if (StrBreedID != "") { StoreFront ObjStoreFront = new StoreFront(); int Count = ObjStoreFront.DeleteBreed(StrBreedID); if (Count == 0) { ErrMessage("Breed(s) in use. It cannot be deleted unless all references to it are deleted"); } else { SuccesfullMessage("Breed(s) deleted successfully."); } } BindGrid(ddlPetList.SelectedValue); }