I need to show the values in my datagridview as currency, I can do the currency format but that uses my default system currency.

I load projects that are in many different currencies, at the moment I have it as 1,000.00 and I look at currency name I set up in label1 to see what currency it is. It would look better if there was signals before the values.

Basically I want to show the Currency symbol related to label1.text

lol ... i know this is not actual code but I want something this simple

If label1.text = "USD" then 
currnecy.format = $
end if

If label1.text = "GBP" then 
currnecy.format = £
end if

I use many different currencies so this will be the best for me to use like this, i keep getting the defualt system curency. I want to able to use the values in the cells to calculate other values on the grid too like totals

Thnx

Recommended Answers

You'll probably have to look at the currency format specifier and the NumberFormatInfo Class which will allow you to format the string according to the currency format of different cultures.

Jump to Post

All 2 Replies

Me.DataGridView.Columns(1).DefaultCellStyle.Format = "c"

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.