Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我可以在将数据集的数据列的类型绑定到网格之前将其格式化为货币(针对特定文化)吗
DataColumns 支持来自 .Net 系统的各种类型。
它们在MSDN中列出。货币不是 .Net 中的一种类型。通常,此用途首选十进制。
您可以将列的 DataFormatString 属性设置为“C”。
格式化时应考虑当前的文化。如果这是针对线程文化不是用户文化的应用程序,那么您必须按照此处的说明手动执行。