I have a calendar control (calDateGiven) in the editItemTemplate of a gridview which has its visible and selected date properties bound. Each record may or may not have had a date entered previously. If a date has not previously been selected then the DateGiven field in the database will contain NULL.
When the data is bound to the calendar control it throws an error if the database value is NULL because it can't be converted to a date for binding the selected and visible date properties of the calendar. Fair enough. So I figured that I need to use the databinding event of the calendar control to check if the recordset value that's about to be bound to the control is NULL and if it is, avoid binding the calendar's propreties. How do I do this? Specifically, how do I access the DateGiven value that is about to be bound to the control?
Any help much appreciated.