Я пытаюсь открыть ContextMenustrustrustrip
в месте, где я щелкнул мышь, но он всегда показывает в верхнем левом углу экрана Отказ
Вот код, который я использовал:
private void dataGridView1_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
contextMenuStrip1.Show(new Point(e.X,e.Y));
doss.getdossier(connection.conn, Convert.ToInt32(dataGridView1.Rows[e.RowIndex].Cells[0].Value));
}
}