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.

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top