Hi,
I'm trying to have a cell in the grid that allows user to see and input a datetime value. I'm using for this [UltraDateTimeEditor] which has the properties set as
datetimeEditor->FormatProvider = System::Globalization::CultureInfo::CurrentUICulture->DateTimeFormat; datetimeEditor->MaskInput = "{date} {time}"; datetimeEditor->FormatString = System::Globalization::CultureInfo::CurrentUICulture->DateTimeFormat->ShortDatePattern + " " + System::Globalization::CultureInfo::CurrentUICulture->DateTimeFormat->LongTimePattern; datetimeEditor->AutoFillTime = Infragistics::Win::UltraWinMaskedEdit::AutoFillTime::Midnight; datetimeEditor->AutoFillDate = Infragistics::Win::UltraWinMaskedEdit::AutoFillDate::MonthAndYear; datetimeEditor->Value = "00/00/0000 00:00:00";
but it display wrong datetime in a wrong format in a non-english enronment. See this image (windows is using Slovenian settings)https://www.dropbox.com/s/8tjkzmgjbcjkomm/1.png?dl=1
How do I set properly the properties to mimic exactly the system settings?
Thx
I don't see anything wrong with the settings you are using here, although there's no reason to set the FormatProvider to the same as the current culture - that's the default.
Also, I don't think the Value you are setting on the DateTimeEditor is valid. All 0's is less than the MinDate. But that should raise an exception, not show the wrong formatting.
Can you tell me what the System.Globalization.CultureInfo.CurrentCulture.Name of the CurrentCulture so I can try this out with the same culture you are using?
ignore the 00/00 value, later I read correct values from database.
check the attached image for CultureInfo
https://www.dropbox.com/s/ac2uga7b45qhcej/si-culture.png?dl=0