public DashboardTDS.DashboardMyServiceRequestsDataTable GetDetails() { dashboardMyServiceRequests = (DashboardTDS.DashboardMyServiceRequestsDataTable)HttpContext.Current.Session["dashboardMyServiceRequestsDummy"]; if (dashboardMyServiceRequests == null) { dashboardMyServiceRequests = ((DashboardTDS)HttpContext.Current.Session["dashboardMyServiceRequestsTDS"]).DashboardMyServiceRequests; } return dashboardMyServiceRequests; }
protected void MyServiceRequestsEmptyFix(GridView grdView) { if (grdMyServiceRequests.Rows.Count == 0) { DashboardTDS.DashboardMyServiceRequestsDataTable dt = new DashboardTDS.DashboardMyServiceRequestsDataTable(); dt.AddDashboardMyServiceRequestsRow(0, "", false, "", ""); Session["dashboardMyServiceRequestsDummy"] = dt; grdMyServiceRequests.DataBind(); } // Normally executes at all postbacks if (grdMyServiceRequests.Rows.Count == 1) { DashboardTDS.DashboardMyServiceRequestsDataTable dt = (DashboardTDS.DashboardMyServiceRequestsDataTable)Session["dashboardMyServiceRequestsDummy"]; if (dt != null) { // Hide row grdMyServiceRequests.Rows[0].Visible = false; grdMyServiceRequests.Rows[0].Controls.Clear(); } } }