J
Johnaton
hi, I have this problem with the date time picker, when I bind the control
to data table and add new record, it is ok, however, if I delete all records
via a button using the
me.bindingcontext(datatable).removeat(me.bindingcontext(dataTable).position)
statement, it always throw the following error ..
A first chance exception of type 'System.ArgumentException' occurred in
system.dll
Additional information: '1/1/0001 12:00:00 AM' is not a valid value for
'Value'. 'Value' should be between 'MinDate' and 'MaxDate'.
microsoft KB
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q313513#kb5
did acknowledge this problem but it doesn't seem to solve this situation.
To simulate this problem, just create a table with a datetime field and bind
it to a window form date time picker control, then have 2 buttons, one to
add records via Me.BindingContext(dataTable).AddNew() ... and another to
delete the record via above mentioned code, when you are deleting the last
record, this error will popup even you include the format & parse codes as
recommend by MS. The problem here is that it doesn't even go to the
format/parse when before it throws this error..
Can anyone please help!
Thank in advance
Hanbert
to data table and add new record, it is ok, however, if I delete all records
via a button using the
me.bindingcontext(datatable).removeat(me.bindingcontext(dataTable).position)
statement, it always throw the following error ..
A first chance exception of type 'System.ArgumentException' occurred in
system.dll
Additional information: '1/1/0001 12:00:00 AM' is not a valid value for
'Value'. 'Value' should be between 'MinDate' and 'MaxDate'.
microsoft KB
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q313513#kb5
did acknowledge this problem but it doesn't seem to solve this situation.
To simulate this problem, just create a table with a datetime field and bind
it to a window form date time picker control, then have 2 buttons, one to
add records via Me.BindingContext(dataTable).AddNew() ... and another to
delete the record via above mentioned code, when you are deleting the last
record, this error will popup even you include the format & parse codes as
recommend by MS. The problem here is that it doesn't even go to the
format/parse when before it throws this error..
Can anyone please help!
Thank in advance
Hanbert