View Single Post
 
Old May 2nd, 2014, 01:45 PM
Rod Stephens's Avatar
Rod Stephens Rod Stephens is offline
Wrox Author
Points: 3,166, Level: 23
Points: 3,166, Level: 23 Points: 3,166, Level: 23 Points: 3,166, Level: 23
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2006
Location: , , .
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts
Default

Huh. Your code doesn't have that apostrophe on the second line, right? And you're registering it with the Handles clause, not an AddHandler statement?

I think the CellClick event handler should take a DataGridViewCellEventArgs as a parameter, so I don't see what's wrong with your code.

You might try commenting out the event handler and then creating a new one by using the Properties window or dropdowns in the code editor, just to see if it gives you something with the same parameters.

If that doesn't work, I would try changing the e parameter's data type to System.EventArgs. Then set a breakpoint inside the event handler so you can see what is in that parameter when the event handler executes. For example, you can type this in the Immediate window to see what type the e parameter really has:

Code:
?TypeName(e)
Or you can hover over it to see what values it contains.
__________________
Rod

Rod Stephens, Microsoft MVP

Essential Algorithms: A Practical Approach to Computer Algorithms

(Please post reviews at Amazon or wherever you shop!)
The Following User Says Thank You to Rod Stephens For This Useful Post:
shabnamzangeneh (May 6th, 2014)