DatePicker.Value.Set Error binding to datasource

后端 未结 2 1270
再見小時候
再見小時候 2021-01-19 19:15

I have a bindingsource control called binding, on a form in VS2012, and a DateTimePicker control bound to it.

for the binding properties I have MinDate = 1/01/1753

2条回答
  •  时光说笑
    2021-01-19 19:41

    It seems that the key problem is the property is a Nullable DateTime. Probably the null value used to transcribe the DateTimePicker component is '1 / 01/0001 12:00:00 AM 'which creates a problem related to the configuration of MinValue and MaxValue. Using the Advanced tab of the DataBinding has an option to set the value to be used to null One way to solve this would be setting the value to null as MinDate, or we can set the MinDate with the value '01 / 01/0001 12:00 : 00 AM '. Despite my limited experience, I believe that this may be the source of your problems. the link http://msdn.microsoft.com/en-us/library/aa480734.aspx can see something else on the Advanced tab of the property DataBinding.

提交回复
热议问题