B
Blue Stallion
I am creating a form that has a DateTimePicker control that is bound to a
DateTime field in a SQL Server database. When I step through the records in
the database by using the next and previous buttons on the toolbar the
DateTimePicker control does not always show the correct data. If the
DateTime field in the database has an entry it will be displayed, however, if
the field is null, the data from the previous record is displayed. If the
next or previous button is clicked with the erroneous data displayed, it is
now remember and stored with the record. I have read in other threads that
the DateTimePicker control has problems with nulls. Is there something I can
put in the next and previous buttons click methods that would clear out the
data from the previous record before showing the new current record, where
the field would be null (not checked) if the new current field is null, or
display the new current data, if available?
I am using C# 2005 in Visual Studio 2005
Thanks,
DateTime field in a SQL Server database. When I step through the records in
the database by using the next and previous buttons on the toolbar the
DateTimePicker control does not always show the correct data. If the
DateTime field in the database has an entry it will be displayed, however, if
the field is null, the data from the previous record is displayed. If the
next or previous button is clicked with the erroneous data displayed, it is
now remember and stored with the record. I have read in other threads that
the DateTimePicker control has problems with nulls. Is there something I can
put in the next and previous buttons click methods that would clear out the
data from the previous record before showing the new current record, where
the field would be null (not checked) if the new current field is null, or
display the new current data, if available?
I am using C# 2005 in Visual Studio 2005
Thanks,