Example #1
0
        private void DocGridHeader_MouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            hederClick = true;
            if (!IsFine)
            {
                return;
            }

            if (e.Button != MouseButtons.Right)
            {
                return;
            }

            Console.WriteLine("{0}: try to build HeaderContextMenu", DateTime.Now.ToString("HH:mm:ss fff"));
            ContextMenu contextMenu = Style.BuildHeaderContextMenu(e.ColumnIndex);

            if (contextMenu != null && contextMenu.MenuItems.Count > 0)
            {
                contextMenu.Show(this, PointToClient(Cursor.Position));
            }
        }