Data Formatting expression

G

Guest

I currently have this in some money fields that display a PO amount.

{0:c}

What I'd like to do is have just the dollars display (no decimal point &
cents), perhaps round to the next number if the cents are over .50.

How can you do this in a datagrid?

Also, this goes along with being able to have the sort capability as well as
being able to sum these columns.

Thanks,

Sc
 
J

John Saunders

I currently have this in some money fields that display a PO amount.

{0:c}

What I'd like to do is have just the dollars display (no decimal point &
cents), perhaps round to the next number if the cents are over .50.

How can you do this in a datagrid?

Also, this goes along with being able to have the sort capability as well as
being able to sum these columns.

If you need to be able to sort on the visible value, and to show a sum of
the visible values, then you'll have to do that yourself. Just do your
rounding before you display the data.

Use {0:c0} to get no digits after the decimal point.
 

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,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top