protected void ASPxCallbackPanel1_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e) { if (Request.QueryString["Server"] != "" && Request.QueryString["Server"] != null) { SetExchangeGridFromQString(Request.QueryString["Server"]); lblServerName.Text = Request.QueryString["Server"]; SetGraph("hh", lblServerName.Text); } else { //lblServerName.Text = ""; int index = DiskHealthGrid.FocusedRowIndex; //8/9/2013 NS modified - when no rows were found, object reference not set error appeared if (index > -1) { webChartDiskHealth.Visible = true; string value = DiskHealthGrid.GetRowValues(index, "DeviceName").ToString(); lblServerName.Text = value; SetGraph("hh", value); } else { webChartDiskHealth.Visible = false; } } }
protected void btnCollapse_Click(object sender, EventArgs e) { if (btnCollapse.Text == "Collapse All Rows") { DiskHealthGrid.CollapseAll(); btnCollapse.Image.Url = "~/images/icons/add.png"; btnCollapse.Text = "Expand All Rows"; } else { DiskHealthGrid.ExpandAll(); btnCollapse.Image.Url = "~/images/icons/forbidden.png"; btnCollapse.Text = "Collapse All Rows"; } if (Request.QueryString["Server"] != "" && Request.QueryString["Server"] != null) { SetGridFromQString(Request.QueryString["Server"]); lblServerName.Text = Request.QueryString["Server"]; SetGraph(lblServerName.Text); } else { if (Session["ServerName"] != null) { int index = DiskHealthGrid.FocusedRowIndex; string value = DiskHealthGrid.GetRowValues(index, "ServerName").ToString(); lblServerName.Text = value; SetGraph(lblServerName.Text); } else { lblServerName.Text = ""; // int index = DiskHealthGrid.FocusedRowIndex; string value = DiskHealthGrid.GetRowValues(0, "ServerName").ToString(); lblServerName.Text = value; SetGraph(lblServerName.Text); } } //int index = Convert.ToInt32(DiskHealthGrid.FocusedRowIndex); //int exCount = 0; //for (int i = DiskHealthGrid.SettingsPager.PageSize * DiskHealthGrid.PageIndex; i < index; i++) //{ // if (DiskHealthGrid.IsRowExpanded(i)) // exCount += 1; //} //DiskHealthGrid.CollapseAll(); //DiskHealthGrid.FocusedRowIndex = index - exCount / 2; }
public void SetExchangeGridFromQString(string serverName) { try { DataTable dt = VSWebBL.DashboardBL.DiskHealthBLL.Ins.SetExchangeGridFromQString(serverName); DiskHealthGrid.DataSource = dt; DiskHealthGrid.DataBind(); ((GridViewDataColumn)DiskHealthGrid.Columns["DeviceName"]).GroupBy(); } catch (Exception ex) { Response.Write("Error : " + ex); Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex); throw ex; } }
public void SetGrid() { try { DataTable dt = VSWebBL.DashboardBL.DiskHealthBLL.Ins.SetGridforExchange(servernamelbl.Text); Session["GridData"] = dt; DiskHealthGrid.DataSource = dt; DiskHealthGrid.DataBind(); //((GridViewDataColumn)DiskHealthGrid.Columns["DeviceName"]).GroupBy(); int rowIndex = DiskHealthGrid.FindVisibleIndexByKeyValue("ProbeID"); //Session["rowIndex"] = rowIndex; } catch (Exception ex) { Response.Write("Error : " + ex); Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex); throw ex; } }
public void SetGridFromSession() { try { if (Session["GridData"] != null) { DataTable dt = Session["GridData"] as DataTable; DiskHealthGrid.DataSource = dt; DiskHealthGrid.DataBind(); int rowIndex = DiskHealthGrid.FindVisibleIndexByKeyValue("ProbeID"); Session["rowIndex"] = rowIndex; } } catch (Exception ex) { Response.Write("Error : " + ex); Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex); throw ex; } }