Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi to all,

I have One field with Decimal Datatype.
I have to show that field in the ListView but I have to show that as a integer value.

I Don't want to write converter for that...

Content="{Binding ItemPercentageComplete}"
ContentStringFormat="{}{0:C}"/


I tried like this but still am getting data as decimal data example:
if ItemPercentageComplete is 20.50
I want to show that as 20.
Posted
Updated 13-Oct-10 21:33pm
v2
Comments
Dalek Dave 14-Oct-10 3:33am    
Edited for Readability and Code Blocks.

1 solution

Use : {0:C2}. This should work for you. For more details you can read Standard Numeric Format Strings[^]
 
Share this answer
 
Comments
satyagrahi_2010 14-Oct-10 3:05am    
Thanks Nice answer... helped me to learn more
The Manoj Kumar 14-Oct-10 4:00am    
Please mark as answer if this work for you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900