Hi,
I have a xamdatagrid created dynamically with some date controls on it. The source of the grid is a xmldataprovider which fetches data through Xmlserializing and deserializing some requests. Have used XamDateTimeEditor for datetime fields.
field.Settings.EditAsType = typeof(DateTime);Style fieldStyle = new Style(typeof(XPSXamDateTimeEditor));fieldStyle.Setters.Add(new Setter(XPSXamDateTimeEditor.MaskProperty, "{date}")); field.Settings.EditorStyle = fieldStyle;
THere is also requirement to display date fields in MM/DD/YYYY fomrat.
The data on the grid loads as expected but when i try to change any of the date fields & save, i get an exception reading "The string is not a valid AllXsd value" .
NOte: I have some Xmldeseriallizing logic in the save method.
According to the XML schema spec, date time values should be in ISO8601 format something like 2009-03-13T22:16:00, but when i change the date field the format changes to 03/13/2009. Any suggestions on how to resolve the problem?
THanks in advance.
Fixed by means of a converter. In the convertback method formated the string according to the ISO8601 format.