Frage

When Application loads the date time format is displayed correctly according to regional setting in the grid cell, but when I refresh or reload the grid content after changing the regional setting. The changed format does not reflect in the cell.

So the format changes when I load the application first time.

Is there any way to change the format while the application is running.

War es hilfreich?

Lösung

CultureInfo data is cached first time it's requested, so it's required to call CultureInfo.ClearCachedData method to get updated format values.

As a side note it's pretty strange that you assuming frequent settings changes during app runtime. If it's requred for app to have some sort of format changes it's better to make that an application option.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top