private void DataGridView_MouseUp(object sender, MouseEventArgs e) { var hitTestInfo = _dataGridView.HitTest(e.X, e.Y); /*Ha fejlcécre kattint, akkor egy másik kontext menü jelenik meg.*/ if (hitTestInfo.Type == DataGridViewHitTestType.ColumnHeader) { if (e.Button == System.Windows.Forms.MouseButtons.Right) { CreateColumnHeaderContextMenuStrip(hitTestInfo.ColumnIndex).Show(_dataGridView, new System.Drawing.Point(e.X, e.Y)); } } }