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