Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to show prices in the format 0,00(ie for hundred 100,00)

Tags:

c#

devexpress

hii,

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#.

like image 727
amk Avatar asked Nov 30 '22 17:11

amk


1 Answers

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 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").

like image 132
Joe Avatar answered Dec 15 '22 06:12

Joe