Exemplo n.º 1
0
        void spravaGridUserControl1_SpravaGridMouseUp(object sender, SpravaGridMouseUpEventArgs e)
        {
            DataGridView grid = spravaGridUserControl1.DataGridViewUserControl.DataGridView;
            int          x    = e.MouseEventArgs.X;
            int          y    = e.MouseEventArgs.Y;

            if (e.MouseEventArgs.Button == MouseButtons.Right && grid.HitTest(x, y).Type == DataGridViewHitTestType.Cell)
            {
                mnQ.Enabled      = /*mnQ.Visible =*/ !forViewingOnly && kvalColumnVisible();
                mnR.Enabled      = /*mnR.Visible =*/ !forViewingOnly && kvalColumnVisible();
                mnPrazno.Enabled = /*mnPrazno.Visible =*/ !forViewingOnly && kvalColumnVisible();
                mnPromeniPoredakZaIsteOcene.Enabled = !forViewingOnly;
                if (!forViewingOnly)
                {
                    findIstiRezultati();
                    mnPromeniPoredakZaIsteOcene.Enabled = istiRezultati.Count > 1;
                }
                contextMenuStrip1.Show(grid, new Point(x, y));
            }
        }
 void spravaGridUserControl1_SpravaGridMouseUp(object sender, SpravaGridMouseUpEventArgs e)
 {
     DataGridView grid = spravaGridUserControl1.DataGridViewUserControl.DataGridView;
     int x = e.MouseEventArgs.X;
     int y = e.MouseEventArgs.Y;
     if (e.MouseEventArgs.Button == MouseButtons.Right && grid.HitTest(x, y).Type == DataGridViewHitTestType.Cell)
     {
         mnQ.Enabled = /*mnQ.Visible =*/ kvalColumnVisible();
         mnR.Enabled = /*mnR.Visible =*/ kvalColumnVisible();
         mnPrazno.Enabled = /*mnPrazno.Visible =*/ kvalColumnVisible();
         contextMenuStrip1.Show(grid, new Point(x, y));
     }
 }
Exemplo n.º 3
0
 private void spravaGrid_MouseUp(object sender, SpravaGridMouseUpEventArgs e)
 {
     if (e.MouseEventArgs.Button == MouseButtons.Right)
     {
         OnSpravaGridRightClick(
             new SpravaGridRightClickEventArgs(e.Sprava, e.MouseEventArgs));
     }
 }