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

All 2 Replies

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.

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

Be a part of the DaniWeb community

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