I have few columns in my DataGridView, and there is data in my rows. I saw few solutions in here, but I can not combine them!
Simply a way to right-click on a row, i
private void dataGridView1_CellContextMenuStripNeeded(object sender, DataGridViewCellContextMenuStripNeededEventArgs e) { if (e.RowIndex != -1) { dataGridView1.ClearSelection(); this.dataGridView1.Rows[e.RowIndex].Selected = true; e.ContextMenuStrip = contextMenuStrip1; } }