views:

49

answers:

2

Is it only in the event arguments that get passed into the event handler?

i know you can get which button made the click in the mouse event, but is that the only difference?

+4  A: 

The CellClick event does not receive information about the mouse position. If the event handler needs information about the mouse position, use the CellMouseClick event.

See here:

http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.cellclick(VS.80).aspx

MUG4N
+4  A: 

Exact same kind of difference as between a control's Click and MouseClick events. The Click event can also be generated by the keyboard. For example when the user presses the space bar when a button has the focus.

Very similar for DataGridView, OnCellClick can be raised when the column contains a Button, CheckBox or link. Necessarily there is no mouse info, the cursor could be anywhere.

Hans Passant