DateTimePicker Binding problems

  • Thread starter Thread starter Chris W
  • Start date Start date
C

Chris W

Hi,

I am trying to bind the DateTimePicker (have tried opennetcf and the
microsoft one) to a field in my database. The default value for this
field is "Now()", the problem comes when i change this using the
datetimepicker the field isnt changed in my database. Does anyone have
any ideas??

I am binding just using the normal binding code e.g.
mydatetimepicker.databindings.add(new
binding("Value",mydataset,"datefield"))

Thanks

Chris
 
That's because it not supposed to. Data source is only updated on validation
event.

Move focus away from DTP and data in the dataset will be updated.



Also, if by data base you mean something other than dataset itself (say, SQL
CE), it won't be updated until you execute code to update it (e.g.
DataAdapter.Update()).



Best regards,



Ilya



This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top