Click here to Skip to main content
15,895,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
what will be the dataformat string for(-$1500.00) in gridview?

I already tried,

"{0:C2}"

"{0:$###,###.##}"

"{0}"


I want the negative number in the follwing manner

(-$1500.00)


and the positive number

$1500.00


Thanks.
Posted

1 solution

Try this:

"{0:$#,##0.00;($#,##0.00)}"
 
Share this answer
 
v3
Comments
Sandesh M Patil 22-Sep-11 4:47am    
Not working :(
Sandesh M Patil 22-Sep-11 5:18am    
Got that {0:$#,##0.00;(-$#,##0.00)} thanks

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