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;
         }
     }
 }
Пример #2
0
        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;
        }