View Single Post
 
Old May 6th, 2014, 09:24 PM
mmorgan30 mmorgan30 is offline
Friend of Wrox
Points: 528, Level: 8
Points: 528, Level: 8 Points: 528, Level: 8 Points: 528, Level: 8
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2014
Posts: 136
Thanks: 1
Thanked 10 Times in 10 Posts
Default

The exception tells you exactly what is wrong. Your event handler event args is of type System.Windows.Forms.DatagridCellEventArgs and the type of events that the framework expects is of type System.EventArgs so it throws a cast exception. Change the type of the event args to System.EventArgs and you will fix it.
The Following User Says Thank You to mmorgan30 For This Useful Post:
shabnamzangeneh (May 6th, 2014)