Exemplo n.º 1
0
 protected void DoShowMenu(GridHitInfo hi)
 {
     if (hi.HitTest == GridHitTest.ColumnButton)
     {
         GridViewMenu gridViewColumnButtonMenu = new GridViewColumnButtonMenu(this.gbList);
         gridViewColumnButtonMenu.Init(hi);
         gridViewColumnButtonMenu.Show(hi.HitPoint);
     }
 }
Exemplo n.º 2
0
        private void MyGridControl_MouseUp(object sender, MouseEventArgs e)
        {
            // Get a View at the current point.
            BaseView View = GetViewAt(e.Location);
            // Retrieve information on the current View element.
            BaseHitInfo baseHI = View.CalcHitInfo(e.Location);
            GridHitInfo gridHI = baseHI as GridHitInfo;

            //Perform any necessary logic
            if (gridHI.InRow == true && gridHI.InRowCell == false && e.Button == MouseButtons.Right)
            {
                GridViewColumnButtonMenu Menu = new GridViewColumnButtonMenu(View as GridView);
                Menu.SubMenuItems = SubMenuItems;
                Menu.OnMyClick   += new GridViewColumnButtonMenu.OnMyClickEventHandler(Menu_OnMyClick);
                Menu.Init(gridHI);
                Menu.Show(gridHI.HitPoint);
            }
        }