如何在金额列中显示货币符号(磅) [英] how to display currency sign (pound) in amount column
本文介绍了如何在金额列中显示货币符号(磅)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在vb.net中的金额列旁边插入货币英镑或英镑
我有1列名为金额。现在,当我在datagridview中显示金额列时,我想要在每个金额旁边显示货币符号。
例如$ 200
$ 180
请帮帮我。
解决方案
200
< blockquote> 180
请帮帮我。
基本上,您使用System.Windows.Forms.DataGridViewCellStyle.Format
property:
http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewcellstyle.format.aspx [ ^ ]。
无论何时应用单元格格式,都会自然应用。通常,这是针对整个列完成的:请参阅上面引用的页面上的代码示例。
注意更加个性化和灵活的格式化技术(您可能赢了)我们需要解决您当前的问题,但最好知道):处理CellFormatting
事件: http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.cellformatting.aspx [ ^ ]。
-SA
how to insert currency pound or sterling beside amount column in vb.net
i have 1 column named amount. now when i am dispalying the amount column in datagridview, i want beside every amount the currency sign appears.
e.g $200
$180
please help me please.
解决方案
200
180
please help me please.
Basically, you specify the cell style format using theSystem.Windows.Forms.DataGridViewCellStyle.Format
property:
http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewcellstyle.format.aspx[^].
This is applied, naturally, whenever a cell format is applied. Typically, this is done for the whole column: please see the code sample on the page referenced above.
Note a more customized and flexible formatting technique (which you probably won't need to solve your current problem, but it's good to know): handling theCellFormatting
events: http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.cellformatting.aspx[^].
—SA
这篇关于如何在金额列中显示货币符号(磅)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文