Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
975
Date display format and culture settings
posted

I'm having a problem with the XamDataGrid displaying dates.

By default, it displays a date in mm/dd/yyyy format. I've tried changing the format property of the  texteditor for the cell, but when I set it to "dd/mm/yyyy" for some reason, the month part of the date is completely wrong. I'm getting 19/02/2009 displayed as 19/37/2009 and 19/00/200, and I can't see why this is happening. Is it a bug with the datapresenter, or am I missing a setting somewhere.

I've tried setting explicitly setting the CurrentUICulture to "en-GB" but this makes no difference. I've tried using the mask property but is doesn't help.

Checking the System.Globalization.CultureInfo, it says that the InstalledUICulture is still set to en-US, but searching around seems to suggest this is irrelevant. Is the datagrid using this setting, and even if it is, is there anyway to get it displaying the month correctly?

Parents
  • 975
    posted
    I've managed to get it working by setting the grid.Language property in the constructor of the control, but is there no way to get the grid to use the CurrentUICulture setting by default as other controls do?
Reply Children