cluelessAnyAdvise
Programmer
Hi
Is there any way to control the behavior of the check box on the datetime picker control that is bound to dataset.
I have a dateTimePicker control on a Windows Form (VB.NET),
which is bound to a dataset (database column of date type).
Following properties are set -
editfldName.Checked = False
editfldName.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.dsName, "tblName.fldName"))
editfldName.ShowCheckBox = True
As I understand it is not possible to set a DateTimePicker to null value (if the DB column has null). So there is no way to clear out the datetime picker's text itself. Currently it shows the default date (Date.Now) when dataset column has no date in it. The check box next to it is always checked once the data is loaded on the form.
So there is no visual indication for the users to determine if the value shown is from dataset or default.
So I'd like to show -
checkbox as checked if the value in <editfldName> is the one from dataset column.
checkbox as NOT checked when the value is default value of datetimepicker (ie. Date.Now)
Any suggestions? Please help.
Thanks
Is there any way to control the behavior of the check box on the datetime picker control that is bound to dataset.
I have a dateTimePicker control on a Windows Form (VB.NET),
which is bound to a dataset (database column of date type).
Following properties are set -
editfldName.Checked = False
editfldName.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.dsName, "tblName.fldName"))
editfldName.ShowCheckBox = True
As I understand it is not possible to set a DateTimePicker to null value (if the DB column has null). So there is no way to clear out the datetime picker's text itself. Currently it shows the default date (Date.Now) when dataset column has no date in it. The check box next to it is always checked once the data is loaded on the form.
So there is no visual indication for the users to determine if the value shown is from dataset or default.
So I'd like to show -
checkbox as checked if the value in <editfldName> is the one from dataset column.
checkbox as NOT checked when the value is default value of datetimepicker (ie. Date.Now)
Any suggestions? Please help.
Thanks