I'm having a heck of a time trying to get this to work, but it has to be possible! I have a bound DataGridView that includes a bunch of date columns, which may or may not be null (the database does allow nulls in these fields). Null values are displayed with no problem, but I want the user to be able to edit these fields and delete a date if someone put the date in the wrong field. However as soon as I leave the cell (after erasing the date) I get the error "System.FormatException: String was not recognised as a valid DateTime".
IsDBNull(cell value) does return true, so it recognizes that the cell is null. How can I get the grid to accept a null without an error?
IsDBNull(cell value) does return true, so it recognizes that the cell is null. How can I get the grid to accept a null without an error?