Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How can i edit my datagrid using right click of mouse.
Posted

1 solution

Use the CellMouseClick event handler which will fire the left/right click event...below following code might useful to you.

private void dataGridView1_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e)
{

if (e.Button == MouseButtons .Right )
{
dataGridView1.Rows[dataGridView1.CurrentRow.Index].Cells["NAME"].Value = "TEN";
}
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900