How to databind
All,

I have an SfDateTimeEdit control in a userform and would like to bind the data to a binding source. I keep getting an system.arguementexception.
I am adding the following binding when the datasource is changed for the binding source.
(VB.NET CODE)
RestDate.DataBindings.Clear()
ResetDate.DataBindings.Add(New Binding("Value", bsData, "fsrSysInfoServoResetDate", True, DataSourceUpdateMode.OnPropertyChanged)).
This same binding technique works for all my other syncfusion controls. What am I doing wrong? Any help would be appreciated!
Thanks,
Nathan
SIGN IN To post a reply.
3 Replies
JP
Jagadeesan Pichaimuthu
Syncfusion Team
January 16, 2019 06:03 AM UTC
Hi Nathan,
Thanks for using Syncfusion product.
We have checked your query “ArgumentException occurs when binding the text in SfDateTimeEdit using Databinding” and conformed that it is already a known issue, it occurs due to validation. Since the value of Value property of SfDateTimeEdit is updated using Databinding. SfDateTimeEdit expecting CancelEventHandler(which is modified as Validating event handler in SfDateTimeEdit). Due to unavailability of cancel event handler, the reported exception occurs. We have fixed this issue and SfDateTimeEdit will not handle the validation of date values in Validating event. Now, we have introduced new event DateTimeValidating and you can use DateTimeValidating event to validate the value in SfDateTimeEdit. The fix for the issue will be included in our upcoming Nuget release on today (16th January 2019).
Regards,
Jagadeesan
NC
Nathan Cole
January 16, 2019 12:29 PM UTC
Thank you for the update.
JP
Jagadeesan Pichaimuthu
Syncfusion Team
January 17, 2019 09:20 AM UTC
Hi Nathan,
Sorry for the inconvenience.
As we already mentioned, we have fixed this issue and SfDateTimeEdit will not handle the validation of date values in Validating event. Now, we have introduced new event DateTimeValidating and you can use DateTimeValidating event to validate the value in SfDateTimeEdit. The fix for the issue will be included in our upcoming Nuget release on 22nd January 2019.
Regards,
Jagadeesan
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
NC Nathan Cole
- Jan 15, 2019 02:21 PM UTC
- Jan 17, 2019 09:20 AM UTC