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.
如何更改 WinForm 应用程序中 DataGridView 单元格中的日期格式?该单元格的源格式是“YYYY-MM-DD”,我想将其更改为“DD/MM/YYYY”。我怎样才能做到这一点?
通过更改默认单元格样式。
this.DataGridView1.Columns[0].DefaultCellStyle.Format = "dd/MM/yyyy"
http://msdn.microsoft.com/en-us/library/f9x2790s.aspx