Rank: Member Groups: Member
Joined: 10/18/2010 Posts: 29
|
Hello
I am using a datepicker control inside a template field inside an asp.net gridview. If I attempt to edit the record that stores the date information, but the date field is null, when the page attempts to load, it throws an error to say Conversion from type 'DBNull' to type 'Date' is not valid..
Is there a property in the datepicker control that I can modify to accommodate this?
Thanks
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
You would bind to SelectedDateString instead of SelectedDate. SelectedDate is a DateTime value and it does not have null value.
Thanks!
|