private void BindGrid() { string id = string.Format("Id: {0} Uri: {1}", Guid.NewGuid(), HttpContext.Current.Request.Url); using (Utils utility = new Utils()) { utility.MethodStart(id, System.Reflection.MethodBase.GetCurrentMethod()); } _caseDetailsBO = new CaseDetailsBO(); try { grdCaseMaster.DataSource = _caseDetailsBO.GetHardDeleteList(txtCompanyID.Text); grdCaseMaster.DataBind(); foreach (DataGridItem grditem in grdCaseMaster.Items) { if (grditem.Cells[35].Text == "True") { grditem.Cells[0].Style.Add("text-decoration", "line-through"); grditem.Cells[1].Style.Add("text-decoration", "line-through"); grditem.Cells[2].Style.Add("text-decoration", "line-through"); grditem.Cells[3].Style.Add("text-decoration", "line-through"); grditem.Cells[4].Style.Add("text-decoration", "line-through"); grditem.Cells[5].Style.Add("text-decoration", "line-through"); grditem.Cells[6].Style.Add("text-decoration", "line-through"); grditem.Cells[7].Style.Add("text-decoration", "line-through"); grditem.Cells[8].Style.Add("text-decoration", "line-through"); grditem.Cells[9].Style.Add("text-decoration", "line-through"); grditem.Cells[10].Style.Add("text-decoration", "line-through"); grditem.Cells[11].Style.Add("text-decoration", "line-through"); grditem.Cells[12].Style.Add("text-decoration", "line-through"); grditem.Cells[13].Style.Add("text-decoration", "line-through"); grditem.Cells[14].Style.Add("text-decoration", "line-through"); grditem.Cells[15].Style.Add("text-decoration", "line-through"); grditem.Cells[16].Style.Add("text-decoration", "line-through"); grditem.Cells[17].Style.Add("text-decoration", "line-through"); grditem.Cells[18].Style.Add("text-decoration", "line-through"); grditem.Cells[19].Style.Add("text-decoration", "line-through"); grditem.Cells[20].Style.Add("text-decoration", "line-through"); grditem.Cells[21].Style.Add("text-decoration", "line-through"); grditem.Cells[22].Style.Add("text-decoration", "line-through"); grditem.Cells[23].Style.Add("text-decoration", "line-through"); grditem.Cells[24].Style.Add("text-decoration", "line-through"); grditem.Cells[25].Style.Add("text-decoration", "line-through"); grditem.Cells[26].Style.Add("text-decoration", "line-through"); grditem.Cells[27].Style.Add("text-decoration", "line-through"); grditem.Cells[28].Style.Add("text-decoration", "line-through"); grditem.Cells[29].Style.Add("text-decoration", "line-through"); grditem.Cells[30].Style.Add("text-decoration", "line-through"); grditem.Cells[31].Style.Add("text-decoration", "line-through"); grditem.Cells[32].Style.Add("text-decoration", "line-through"); grditem.Cells[33].Style.Add("text-decoration", "line-through"); grditem.Cells[34].Style.Add("text-decoration", "line-through"); grditem.Cells[35].Style.Add("text-decoration", "line-through"); } } if (((Bill_Sys_SystemObject)Session["SYSTEM_OBJECT"]).SZ_HARD_DELETE != "True") { grdCaseMaster.Columns[36].Visible = false; btnDelete.Visible = false; btnUnDelete.Visible = false; } } catch (Exception ex) { log.Debug("Shared_MasterPage. Method - Page_Load : " + ex.Message.ToString()); log.Debug("Shared_MasterPage. Method - Page_Load : " + ex.StackTrace.ToString()); log.Debug("Shared_MasterPage. Method - Page_Load : " + ex.InnerException.Message.ToString()); log.Debug("Shared_MasterPage. Method - Page_Load : " + ex.InnerException.StackTrace.ToString()); Elmah.ErrorSignal.FromCurrentContext().Raise(ex); using (Utils utility = new Utils()) { utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod()); } string str2 = "Error Request=" + id + ".Please share with Technical support."; base.Response.Redirect("Bill_Sys_ErrorPage.aspx?ErrMsg=" + str2); } //Method End using (Utils utility = new Utils()) { utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod()); } }