dataGridView1.DefaultCellStyle.NullValue = "---"; //格式化空数据显示格式
dataGridView1.Columns[2].DefaultCellStyle.Format = "¥###,###,###,###,###.##"; //格式化货币显示格式
dataGridView1.Columns[5].DefaultCellStyle.Format = "D"; //格式化日期显示格式
¥399,850 2006年4月26日 ---这样子格式化后的数据,打印不出来了.
dataGridView1.Columns[2].DefaultCellStyle.Format = "¥###,###,###,###,###.##"; //格式化货币显示格式
dataGridView1.Columns[5].DefaultCellStyle.Format = "D"; //格式化日期显示格式
¥399,850 2006年4月26日 ---这样子格式化后的数据,打印不出来了.
解决方案 »
- 请教一下,在VS2010中使用System.Data.SQLite提示所依赖的System.Drawing.Design未引用
- 请问:C# Winform获取系统信息
- How the method SqlDataReader.Read() work?
- 关于treeview控件和button控件配合使用的问题
- asp .net动态添加web控件 急..在线等
- 超级菜鸟问题-如何更改程序的启动项
- 如何把datatable中符合条件的记录复制到另外一张datatable中???
- 请问C#里是不是所有的控件样式都可以自定义?
- 如何通过C#操作dbf文件
- 请问一下谁有具体的RTF的文件格式啊????我想做个和MSN一样的对话框,有什么思路,请大家发表看法,来者有分
- 连接数据库问题
- 为什么gridview里用这样的方法格式不了时间
你把网格内容读到二维数组中,这样就是格式后的数据,传给打印对象datasource即可。