I need to ALWAYS display the currency in French Canadian though. Regardless of what the website is set to.....
Right now I set the DataFormatString = "{0:c}" on boundfields which will format the string according to the currenty Culture settings. Is there a way to specify a culture on that like?
DataFormatString = "{0:c,fr-ca}"????
Currently the way I do it is that I have a derived control MYBoundfield
I added a property called Culture and I override the FormatDataValue method....
PureWeen
Participant
1221 Points
317 Posts
setting the culture of dataformatstring
May 05, 2006 07:39 PM|LINK
Alright so I have a website that's in 2 languages
French and English..
I need to ALWAYS display the currency in French Canadian though. Regardless of what the website is set to.....
Right now I set the DataFormatString = "{0:c}" on boundfields which will format the string according to the currenty Culture settings. Is there a way to specify a culture on that like?
DataFormatString = "{0:c,fr-ca}"????
Currently the way I do it is that I have a derived control MYBoundfield
I added a property called Culture and I override the FormatDataValue method....
protected
override string FormatDataValue(object dataValue, bool encode){
string formattedString = base.FormatDataValue(dataValue,encode); if (this.DataFormatString != null && this.DataFormatString.Length > 0 && Culture != null){
object[] args = { dataValue };formattedString =
String.Format(new System.Globalization.CultureInfo(Culture, false), this.DataFormatString, args);}
return formattedString;}