C
cweibel
This should be an easy problem for those with far more knowledge than
myself with databinding.
I have a VB.NET 2005 windows form with several checkboxes, textboxes
and datepickers which are bound to a single dataset (running SQL Server
2000). The form also contains a record navigation bar to move through
the records. When the form loads, after assigning the table adapter, I
call the AddNew event which calls a function I have to set the default
values for the checkboxes, textboxes and datepickers. After adding all
of the required data and clicking Save in the navigator toolbar I click
AddNew which again calls my function to assign default values. This is
where things get weird: after assigning all the field values and
clicking save for the second time, if the datepicker date did not
change from the previously added record then NULL is saved to the
database.
It seems that there is some internal event that needs to kick off to
force the value in the datepicker back to the databind/datatable.
Ideas?
Thanks in advance,
CW
myself with databinding.
I have a VB.NET 2005 windows form with several checkboxes, textboxes
and datepickers which are bound to a single dataset (running SQL Server
2000). The form also contains a record navigation bar to move through
the records. When the form loads, after assigning the table adapter, I
call the AddNew event which calls a function I have to set the default
values for the checkboxes, textboxes and datepickers. After adding all
of the required data and clicking Save in the navigator toolbar I click
AddNew which again calls my function to assign default values. This is
where things get weird: after assigning all the field values and
clicking save for the second time, if the datepicker date did not
change from the previously added record then NULL is saved to the
database.
It seems that there is some internal event that needs to kick off to
force the value in the datepicker back to the databind/datatable.
Ideas?
Thanks in advance,
CW