如何显示格式0,00的价格(即对百100,00) [英] How to show prices in the format 0,00(ie for hundred 100,00)
问题描述
HII,
我使用的DevExpress网格有价格标签控制。在我的网格,在我想要的价格列格式0,00显示....也就是说,如果我的价格是3000,然后它应该显示3.000,00 ......请帮我......这是WinForms和前端为C#。
I am using devexpress grid control.In my grid there are price tabs,in that i want the prices column to show in the format 0,00....ie if my price is 3000 then it should show 3.000,00...help me please...It is for winforms and the frontend is c#.
推荐答案
的的DevExpress控制是丰富和复杂,并有许多方法可以做到这一点。
The DevExpress controls are rich and complex and there are a number of ways to do this.
最简单的可能是设置一个列的显示格式如下:
The simplest is probably to set a column's display format as follows:
gridColumn.DisplayFormat.FormatString = "N2";
gridColumn.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Custom;
formatString中可以是任何.NET标准或自定义格式字符串(看在MSDN或谷歌标准数字格式字符串,自定义数字格式字符串)。
FormatString can be any of the .NET standard or custom format strings (look in MSDN or google for "Standard numeric format strings", "Custom numeric format strings").
这篇关于如何显示格式0,00的价格(即对百100,00)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!