datagridviewcolumn从1.currentculture或2.currentUIculture获取其日期格式 [英] Where do datagridviewcolumn takes its date format from 1.currentculture Or 2.currentUIculture

查看:112
本文介绍了datagridviewcolumn从1.currentculture或2.currentUIculture获取其日期格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

要显示给用户应使用的CurrentUICulture (日/月/年)我理解什么,但在的DataGridViewColumn我的情况下的日期格式使用的的CurrentCulture (YYYY / MM / dd)格式。

任何想法???



提前感谢你

To my understanding anything displayed to user should use the currentUICulture(dd/MM/yyyy) but in my case date format in datagridviewcolumn uses the currentculture(yyyy/MM/dd) format instead.
Any Idea ???

Thanking you in advance

推荐答案

您似乎误解了 CurrentUICulture

来自文档:

此属性由ResourceManager类用于在运行时查找特定于文化的资源。

其中,对于 CurrentCulture

此信息确定日期,时间,货币和数字的默认格式;文本的排序顺序;字符串比较;和套管。
You appear to be misunderstanding CurrentUICulture.
From the docs:
"This property is used by the ResourceManager class to look up culture-specific resources at run time."
Where, for CurrentCulture:
"This information determines the default formats for dates, times, currency, and numbers; the sorting order of text; string comparisons; and casing. "


这篇关于datagridviewcolumn从1.currentculture或2.currentUIculture获取其日期格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆