条件:
1、用的是VS2005 C#设计的C/S结构的程式。2、用数据邦定DataGridView控件,现后台数据库表中某字段是4小数位,结果DataGridView控件当前列就显示4位小数要求:DataGridView控件当前列只显示用户录入的小数,即如下显示数:
13.0000 --> 13
14.5000 --> 14.5
23.7890 --> 23.789
34.3439 --> 34.3439
1、用的是VS2005 C#设计的C/S结构的程式。2、用数据邦定DataGridView控件,现后台数据库表中某字段是4小数位,结果DataGridView控件当前列就显示4位小数要求:DataGridView控件当前列只显示用户录入的小数,即如下显示数:
13.0000 --> 13
14.5000 --> 14.5
23.7890 --> 23.789
34.3439 --> 34.3439
解决方案 »
- C# socket接收 c语言中的socket 是乱码
- c#连接ACCESS 2003数据库(oledb)的连接字符串报错
- 数组类型
- 在线急等`
- 如何通过datagridview获得该数据集的select语句?
- 请问win编程时在datagrid中双击某单元格的事件是什么?
- ========== 【快来看呀】末结贴集分回收器就职宣言!!!==========
- 应该怎么判断TextBox输入的值为DateTime型?
- 我们的了分可以拿去干什么?
- WebForm中我想用线程显示Button.Text="显示";请教为什么不能显示???
- winform 中关于XML 处理的问题。谢谢.
- 登陆次数限制
private void dataGridView1_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
{
if (e.ColumnIndex == 1)//改成你的列索引
{
e.CellStyle.Format = "0.####";
}
}
http://msdn.microsoft.com/zh-cn/f9x2790s(vs.85).aspx