如何:设置 Windows 窗体 DataGridView 控件中的数据格式 .
this.dataGridView1.Columns["UnitPrice"].DefaultCellStyle.Format = "c";
this.dataGridView1.Columns["ShipDate"].DefaultCellStyle.Format = "d";
上面的那种方法我试了没作用,为啥啊?
this.dataGridView1.Columns["UnitPrice"].DefaultCellStyle.Format = "c";
this.dataGridView1.Columns["ShipDate"].DefaultCellStyle.Format = "d";
上面的那种方法我试了没作用,为啥啊?
解决方案 »
- DataBinding:“System.Data.DataRowView”不包含名为“Title”的属性。
- com.ExecuteNoQuery();//这里出错?错在哪里啊?
- 关于数据库表中一条记录更新的问题?
- 写C#控制台语句到底是先写方法还是先写Mian入口里面代码,谢谢
- C#中for循环问题
- 调用了一个DLL,怎么能不显示字符窗口?
- C#写的组件,asp要调用,是不是还要设置.net库环境变量啊,如果需要请问怎么设置呢
- pread的标签页
- HttpWebRequest.GetResponse()取不到内容
- 救命啊!升级到了IE5.5,office出现50次限制,要我注册了。
- 指针的性能!令人发指!
- 如何将格式化的字符串转化为数字?
2. 右键点击grid控件
3. 执行Edit Columns...
4. 选中要编辑的column
5. DefaultCellstyle右边的...按钮
6. Format属性的...按钮。编辑属性。
试一试"F"
控件属性->Columns->(选中列)DefaultCellStyle->Format->设置格式