Hello everybody,
I have a problem that appears in WinForms, but as the currency format is involved I think the context is larger.
I have a unit price that is displayed with format C2, i.e. currency with two decimal digits.
OK. At execution I realize that this format ends with
Here in Europe this is set to "€".
But I use Northwind database, that shows the products of an American seller. I presume his prices are labelled in dollars, and that a later conversion is required —even if nowadays the difference will not be enormous.
What is the best way to express that this field shows prices in dollars, and that a calculated column further shows euros ?
I am tempted by a personalized format, and for the field I have set it to "#,##0.00 $"
At execution it shows what I planed, nicely with the comma replaced by a space and the dot by a comma, even if the graphical programming interface warns that the exchange with the database has to be double sided.
Anyway, the format does not affect the value, does it?
I mean it only affects how humans will understand it.
In a DataGridView there is no splitting problem. Here in the forum I am supposed to put an unbreakable space, to avoid the $ sign to be displayed on the following line when you display with a narrower window, am I not? How do I do that?
I have a problem that appears in WinForms, but as the currency format is involved I think the context is larger.
I have a unit price that is displayed with format C2, i.e. currency with two decimal digits.
OK. At execution I realize that this format ends with
System.Globalization.CultureInfo.CurrentUICulture.NumberFormat.CurrencySymbol
.Here in Europe this is set to "€".
But I use Northwind database, that shows the products of an American seller. I presume his prices are labelled in dollars, and that a later conversion is required —even if nowadays the difference will not be enormous.
What is the best way to express that this field shows prices in dollars, and that a calculated column further shows euros ?
I am tempted by a personalized format, and for the field I have set it to "#,##0.00 $"
At execution it shows what I planed, nicely with the comma replaced by a space and the dot by a comma, even if the graphical programming interface warns that the exchange with the database has to be double sided.
Anyway, the format does not affect the value, does it?
I mean it only affects how humans will understand it.
In a DataGridView there is no splitting problem. Here in the forum I am supposed to put an unbreakable space, to avoid the $ sign to be displayed on the following line when you display with a narrower window, am I not? How do I do that?
Last edited: