We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

DataBinding to DateTimePickerAdv...

I''m trying to bind to a DateTimePickerAdv... working fine with all other controls, i''m receiving: "Value does not fall within the expected range." doesn''t make sense since there is no nulls in my data and the values fall within a reasonable date range. Checked MinValue and MaxValue properties, they seem fine at their default value. the following code works fine to bind to the text property of a label control: labelDateCreated.DataBindings.Add("Text", dataSource.Tables["Users"], "DateCreated"); but... the following code doesn''t work when trying to bind to the time picker: dateTimePickerDateCreated.DataBindings.Add("BindableValue", dataSource.Tables["Users"], "DateCreated"); ...also tried... dateTimePickerDateCreated.DataBindings.Add("Value", dataSource.Tables["Users"], "DateCreated"); ...also tried... dateTimePickerDateCreated.DataBindings.Add("Text", dataSource.Tables["Users"], "DateCreated");

2 Replies

AD Administrator Syncfusion Team March 16, 2005 04:43 PM UTC

Hi Trevor, To use BindableValue the column you''re binding the DateTimePickerAdv to needs to have it''s type set as DateTime. DateTimePickerAdv throws the exception if anything other than a DateTime is assigned to BindableValue. Regards, Gregory Austin Syncfusion Inc.


SH Stephan Hofmann July 17, 2005 08:21 PM UTC

Hello, this basic question is for me another indicator that the delivered docu is not developer friendly setup. PLease update the docu in such a way how basic functions like data binding, setting values with which property, event and methods according examples can be used. References to class definiotn is not good (it is for me more like an excuse of not going into more detail). If you don''t believe me: try to find out how to bind data for datatimepckadv along the docu, then you will see our problem. This could be done for all other Syncfusion controls as well.

Loader.
Live Chat Icon For mobile
Up arrow icon