Mouse left button should be stop select or click when i edit cell in datagridview. i don't know how to disable mouse left button in windows application.
Asked
Active
Viewed 1,420 times
0
-
You don't disable the mouse buttons; you typically disable controls. Btw unclear what you're asking. – Sriram Sakthivel Feb 26 '15 at 07:02
-
possible duplicate of [Using Window Handle to disable Mouse clicks using c#](http://stackoverflow.com/questions/2878989/using-window-handle-to-disable-mouse-clicks-using-c-sharp) – Mathemats Feb 26 '15 at 07:03
1 Answers
0
you can manage the action in MouseClick
event:
private void dataGridView1_MouseClick(object sender, MouseEventArgs e)
{
if (e.Button == System.Windows.Forms.MouseButtons.Left)
{
// do something
}
}

chouaib
- 2,763
- 5
- 20
- 35
-
When you edit the cell, `DataGridView` won't receive events, the editing control will. – Sriram Sakthivel Feb 26 '15 at 07:04