private void gvwView_DoubleClick(object sender, EventArgs e)
        {
            BandedGridView view = (BandedGridView)sender;

            if (view != null)
            {
                Point             pt   = view.GridControl.PointToClient(Control.MousePosition);
                BandedGridHitInfo info = view.CalcHitInfo(pt);
                DevExpress.XtraGrid.Views.BandedGrid.BandedGridView sndr = sender as DevExpress.XtraGrid.Views.BandedGrid.BandedGridView;
                DevExpress.Utils.DXMouseEventArgs dxMouseEventArgs       = e as DevExpress.Utils.DXMouseEventArgs;
                DevExpress.XtraGrid.Views.BandedGrid.ViewInfo.BandedGridHitInfo hitInfo = sndr.CalcHitInfo(dxMouseEventArgs.Location);
                if (hitInfo.RowHandle < 0)
                {
                    if (hitInfo.Band.Caption.Contains("Chart"))
                    {
                        FRM_SMT_DMP_TOPO_DAILY f1 = new FRM_SMT_DMP_TOPO_DAILY("FORM");
                        f1.Show();
                    }
                }
            }
        }
Example #2
0
        private void gvwView_DoubleClick(object sender, EventArgs e)
        {
            BandedGridView view = (BandedGridView)sender;

            if (view != null)
            {
                Point             pt   = view.GridControl.PointToClient(Control.MousePosition);
                BandedGridHitInfo info = view.CalcHitInfo(pt);
                DevExpress.XtraGrid.Views.BandedGrid.BandedGridView sndr = sender as DevExpress.XtraGrid.Views.BandedGrid.BandedGridView;
                DevExpress.Utils.DXMouseEventArgs dxMouseEventArgs       = e as DevExpress.Utils.DXMouseEventArgs;
                DevExpress.XtraGrid.Views.BandedGrid.ViewInfo.BandedGridHitInfo hitInfo = sndr.CalcHitInfo(dxMouseEventArgs.Location);
                if (hitInfo.RowHandle < 0)
                {
                    if (hitInfo.Band.Caption.Equals("Chart"))
                    {
                        this.Close();
                        Form fc = Application.OpenForms["FRM_SMT_OS_TOPO_WEEKLY_CHART"];
                        if (fc != null)
                        {
                            fc.Show();
                        }
                        else
                        {
                            FRM_SMT_OS_TOPO_WEEKLY_CHART f = new FRM_SMT_OS_TOPO_WEEKLY_CHART();
                            f.Show();
                        }
                    }
                }
            }
        }