Money format in DataGrid

P

PawelR

Hello Group,
How in DataGrid display money value with precisions 2 (ex. 2 000,00 $, or 2
000,00). I get this value from SQL dataBase, this column have money format
and dataGrid display this value 2000,0000 and this is too big precisions :).
 
?

=?ISO-8859-2?Q?Marcin_Grz=EAbski?=

PawelR said:
Hello Group,
How in DataGrid display money value with precisions 2 (ex. 2 000,00 $, or 2
000,00). I get this value from SQL dataBase, this column have money format
and dataGrid display this value 2000,0000 and this is too big precisions :).

Look in .NET docs for:

DataGridTextBoxColumn
DataGridColumnStyle
DataGridTableStyle

and especially for:
DataGridTextBoxColumn.Format

Marcin
 
D

Dmitriy Lapshin [C# / .NET MVP]

and especially for:
DataGridTextBoxColumn.Format

This is the one the original poster will need to set to a custom format
specifier. The original poster should also refer to the "Custom Number
Format Strings" topic in MSDN.
 

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

Top