private void dashboardViewer1_DashboardItemClick(object sender,
                                                  DashboardItemMouseActionEventArgs e)
 {
     if (e.DashboardItemName == "gridDashboardItem1" & e.GetUnderlyingData() != null)
     {
         ShowUnderlyingData(e.GetUnderlyingData());
     }
 }
Example #2
0
        private void dashboardViewer1_DashboardItemDoubleClick(object sender, DashboardItemMouseActionEventArgs e)
        {
            XtraForm form = new XtraForm {
                Text = "Underlying Data"
            };
            DashboardUnderlyingDataSet underlyingData = e.GetUnderlyingData();

            if (underlyingData != null && underlyingData.RowCount > 0)
            {
                DevExpress.XtraGrid.GridControl grid = new DevExpress.XtraGrid.GridControl {
                    Parent     = form,
                    Dock       = DockStyle.Fill,
                    DataSource = underlyingData,
                };
            }
            else
            {
                LabelControl lbl = new LabelControl {
                    Text   = "No Data",
                    Parent = form,
                };
                lbl.AutoSizeMode = LabelAutoSizeMode.None;
                lbl.Appearance.TextOptions.HAlignment = HorzAlignment.Center;
                lbl.Appearance.TextOptions.VAlignment = VertAlignment.Center;
                lbl.Dock = DockStyle.Fill;
            }

            form.ShowDialog();
            form.Dispose();
        }
Example #3
0
 private void dashboardViewer1_DashboardItemClick(object sender,
                                                  DashboardItemMouseActionEventArgs e)
 {
     if (e.DashboardItemName == "chartDashboardItem1" && e.GetAxisPoint() != null)
     {
         XtraForm form = new XtraForm();
         form.Text = e.GetAxisPoint(DashboardDataAxisNames.ChartArgumentAxis).
                     DimensionValue.Value.ToString() + " - " +
                     e.GetAxisPoint(DashboardDataAxisNames.ChartSeriesAxis).
                     DimensionValue.Value.ToString();
         DataGrid grid = new DataGrid();
         grid.Parent     = form; grid.Dock = DockStyle.Fill;
         grid.DataSource = e.GetUnderlyingData();
         form.ShowDialog();
         form.Dispose();
     }
 }
Example #4
0
        /// <summary>
        /// Used to get underlying data and display the DetailData dialog
        /// </summary>
        void DashboardItemClick(object sender, DashboardItemMouseActionEventArgs e)
        {
            if (IsDetailsEnabled(e.DashboardItemName))
            {
                PivotGridControl pivot = dashboardDesigner.GetUnderlyingControl(e.DashboardItemName) as PivotGridControl;
                PivotGridHitInfo hi    = pivot.CalcHitInfo(pivot.PointToClient(Cursor.Position));

                bool doNotShowDataForThisArea =
                    (hi.HitTest == PivotGridHitTest.Value && hi.ValueInfo.ValueHitTest == PivotGridValueHitTest.ExpandButton) ||
                    (hi.HitTest == PivotGridHitTest.None);
                if (!doNotShowDataForThisArea)
                {
                    using (DetailData detailForm = new DetailData(e.GetUnderlyingData()))
                    {
                        detailForm.ShowDialog();
                    }
                }
            }
        }