Click here to Skip to main content
16,020,973 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all visitors
i have problem want to ask.
i have a grid. that grid get data from datasource.
in column price, i wanna show the currency like this ($ 12,234).
Can anybody help me please?
Best Regards.
Posted

See here: http://forums.asp.net/t/1286284.aspx[^]

Hope that helps!
 
Share this answer
 
If you are using vb.net you can make use of .Format field to set the $ in the output.
for doing that you need to do the following.

VB
Dim col1 As New DataGridTextBoxColumn
    With col1
        .MappingName = "<fieldname>"
        .HeaderText = "<header>"
        .Width = <value>
        .Alignment = HorizontalAlignment.Center
        .NullText = ""
        .TextBox.Enabled = True
        .Format = "$00,00"
    End With
</value></header></fieldname>

Hope this might help.
 
Share this answer
 

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