Currency

S

Shapper

Hello,

I have an Access database table where the field [price] is of currency
type.

What do I need to do in my datagrid so that the price column always
display the price number in such a format:

10,032.45 €

Thanks,
Miguel
 
D

Dave Fancher

You say DataGrid but you don't say what type of column. If you're using a
BoundColumn, you can just set the DataFormatString property to "C#" where #
is the number of decimal places you want to use. If you're using a
TemplateColumn, you can use the ToString() overload (of your numeric data
type variable holding the currency amount) that accepts the format string.

The currency format that will be used is dependent on the localization
settings of your application.

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,071
Latest member
MetabolicSolutionsKeto

Latest Threads

Top