User (Legacy) Posted January 18, 2006 Report Share Posted January 18, 2006 Hi Francisco Padron Why do I get an error whenever I execute this code: Chart1.AxisX.DataFormat.Culture.NumberFormat = New System.Globalization.NumberFormatInfo Error message is "Instance is readonly". I need to assign formatting to my chart using System.Globalization.NumberFormatInfo. Need help. Thank you, Raymond Dazo Interprise Solutions Team Link to comment Share on other sites More sharing options...
Software FX Posted January 18, 2006 Report Share Posted January 18, 2006 You can´t change the current culture. You can only change a culture which you have created. The reason for this is quite clear : if you change the number format for a culture that you didn´t create do you want it to affect the entire application, the entire framework ...? The solution is like this: chart1.Culture = new CultureInfo(chart1.Culture.Name); chart1.Culture.NumberFormat = new NumberFormatInfo(); Hope this helps. -C "Raymond Dazo" <raymond.d@interprisesolutions.com> wrote in message news:TWhQ64$GGHA.3756@webserver3.softwarefx.com... > Hi Francisco Padron > > Why do I get an error whenever I execute this code: > > Chart1.AxisX.DataFormat.Culture.NumberFormat = New > System.Globalization.NumberFormatInfo > > Error message is "Instance is readonly". > I need to assign formatting to my chart using > System.Globalization.NumberFormatInfo. Need help. > > Thank you, > > Raymond Dazo > Interprise Solutions Team > Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.