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:
- how bind datetimepicker (format: date) datetime property on form?
- then, how bind yet datetimepicker (format: time) same property?
- 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
Post a Comment