Weird DataGridView Problem

eric13

Active member
Joined
May 25, 2006
Messages
30
Programming Experience
3-5
VS 2008

I have a datagridview with a custom object bound to it. When I enter a cell to edit it, it works fine, if I back space to the first space then try and leave the cell by tabbing or arrowing, it errors with 'Object reference not set to an instance of an object.' If I arrow back to the first space while in edit mode and then try and leave using tab, it works fine. If I back space to any space other than the first space I can leave the cell just fine.

Anyone ever come across this problem?
 
Figured it out

I've figure out that if you back space all the way in the cell of a datagridview, it changes the value to "nothing", that was being passed to my object in the property set which had some validation of the value. Trying to validate the the length of nothing was causing the error. What a pain:mad:, I have validation in most of my property sets!
 
Back
Top