I've got a Nullable Datetime GridViewDataColumn, and if I follow the following steps I'm getting a validation/binding error:
1) Start with a blank column
2) Double-click the column to activate editing but don't type anything, or if you type anything, delete it.
3) Click on any other part of the grid
Validation Error: Object of type System.String cannot be converted to System.Nullable [System.DateTime]
If I start with a column that has data in it and delete it, things work fine. But if I start to edit an empty field and try to leave it while it is still empty, I get this error.
Once the error is up, you can't seem to do anything on the grid until you hit the ESC key, which is confusing our users.
Is something I can do so that leaving the column while it is still empty will be validated properly? This shouldn't be creating a validation problem with a Nullable DateTime.
Thanks.
1) Start with a blank column
2) Double-click the column to activate editing but don't type anything, or if you type anything, delete it.
3) Click on any other part of the grid
Validation Error: Object of type System.String cannot be converted to System.Nullable [System.DateTime]
If I start with a column that has data in it and delete it, things work fine. But if I start to edit an empty field and try to leave it while it is still empty, I get this error.
Once the error is up, you can't seem to do anything on the grid until you hit the ESC key, which is confusing our users.
Is something I can do so that leaving the column while it is still empty will be validated properly? This shouldn't be creating a validation problem with a Nullable DateTime.
Thanks.