c# - How do I Data-Bind dual DateTimePicker to a single DateTime object -


i have simple form, 2 datetimepicker-controls: 1 date, , 1 time. thing these 2 controls supposed represent single point in time. hence "bind" them single datetime property on form (for simplicity). did following:

// start datetime property on form _startdate.databindings.add("value", this, "start");  _starttime.databindings.add("value", this, "start"); 

but hooking "valuechanged" event, yields mixed results... want, updates of property "sluggish". figured way of splitting 2 datetimepicker's common. how it?

update: there possibly multiple questions in there:

  1. how bind datetimepicker (format: date) datetime property on form?
  2. then, how bind yet datetimepicker (format: time) same property?
  3. i'm using visual studio express 2008 (.net 3.5), , seemingly valuechanged events datetimepickers before value changed?

unfortunately, think may finding writing custom control includes both, can data bind to. that's how solved same problem.


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -