StrataFrame Forum

DateTimePicker is not saving values

http://forum.strataframe.net/Topic30689.aspx

By Marcelo Blank - 12/6/2011

Hi

I´m using a simple form, with a DateTimePicker control bound to a datetime field in SQl. The DateTimePicker is bound, and the null value is set to 1/1/1800...

The bo save all the form´s values, but the DateTimePicker value ....

If you put a value directly in SQL it shows in the DTPicker, but when you change the value and save it leaves empty...

VS2010, last varsion o SF. C#

Any idea ? 

Tks.
By Ivan George Borges - 12/6/2011

Hi Marcelo.

You haven't, by any chance, added this field to the BO's FieldsToExcludeFromUpdate property, have you?
By Marcelo Blank - 12/6/2011

Ivan,

Thank you for attention...

No, I did not ... all properties and configurations are default ....

And all the others fields are saving ...


By Ivan George Borges - 12/6/2011

Then, for me, it is a bit hard to tell. I haven't used the DateTimePicker for a while since we got the DateBox control, but if you are dropping a SF DateTimePicker to your form, it is bound to the same BO as the other controls that are saving and the BO is properly mapped, it should just work.

If you think you could reproduce this issue on a sample project using the StrataFrameSample database and post it over here, we would be able to have a look at it and try to find what could be going on.