How to show a Context Menu when you right click a Menu Item in a DataGridView ? I would like to add delete in the menu so that the entire row can be deleted . Thanks in Ad
With reference to Miguel answer
I think this will be easy to implement like this
int currentRowIndex;
private void dataGridView1_CellMouseUp(object sender, DataGridViewCellMouseEventArgs e)
{
currentRowIndex = e.RowIndex;
}
private void deleteToolStripMenuItem_Click(object sender, EventArgs e)
{
dataGridView1.Rows.Remove(dataGridView1.Rows[currentRowIndex]);
}