在VB.NET的DataGridView中显示123,456,789.00 [英] Display 123,456,789.00 in DataGridView in VB.NET

查看:87
本文介绍了在VB.NET的DataGridView中显示123,456,789.00的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,专家,

我有一个查询.它有一些列(代码,名称,价格,数量,数量).
金额列显示:123456789.
我的问题是如何在DataGridView(金额列)中显示123,456,789.00?
我会在查询中格式化它还是在DataGridView中格式化它?

谢谢

TONY

Hi experts,

I have one query. it has some columns(Code,name,price,qty,amount).
The Amount columns displays:123456789.
My question is how can i display 123,456,789.00 in DataGridView(Amount Column)?
Will i format it in Query or format it in DataGridView?

Thanks

TONY

推荐答案

易于在gridview中进行设置,
1>.对于设计时间
打开列"DefaultCellStyle"属性->格式->格式类型=数字

2>.对于运行时
easy to set in gridview,
1>. For Design time
open columns ''DefaultCellStyle'' Property -> Format -> Format type = Numeric

2>. For runtime
DataGridView1.Columns(1).DefaultCellStyle.Format = "N2"


祝您编码愉快!
:)


Happy Coding!
:)


尝试一下
打开列"DefaultCellStyle"属性->格式->格式类型=数字或自定义格式
try this
open columns ''DefaultCellStyle'' Property -> Format -> Format type = Numeric or custom format


这篇关于在VB.NET的DataGridView中显示123,456,789.00的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆