I have a User Control with a tab control with 3 tabs that is getting stuck into a PanelManagerPage on a form. The three tabs on the UserControl TabControl all have databound fields to the same BO. On form load, everything seems to be binding just fine. On tab 1 and on tab 3 there are bound DatePicker controls.
I keep getting errors when the Form is doing a refresh on these controls, (when I click the Edit button) unless they are on the tab I have activated. While stepping through the code, it keeps trying to bind them to the date "# 12:00 AM", instead of what is from the BO/DB.
If I click into the tabs with the datepickers, they seem to work fine, editing, creating new etc, but if I don't click into the tab with the datepickers, I will get the error that it is trying to bind to a date outside the min/max date (1/1/0001 12:00 AM).
Error Code :
BusinessLayerException
An error occurred while refreshing the data from field 'ProjectMainBO.P_DD1391Date' to property 'BindableValue' on control 'DTPDD1391Date.'
BusinessLayerException
An error occurred while refreshing property 'BindableValue' to control 'DTPDD1391Date'
ArgumentOutOfRangeException
Value of '1/1/0001 12:00:00 AM' is not valid for 'Value'. 'Value' should be between 'MinDate' and 'MaxDate'.
Parameter name: Value
Is this error due to how/when these controls get Initialized or something ?
I hope this makes sense, as I have lost even myself by now :-)
Thanks,
Robin Giltner