We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

neutral culture

Thread ID:

Created:

Updated:

Platform:

Replies:

6034 Jul 29,2003 09:51 AM Jul 30,2003 10:10 AM Windows Forms 4
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On July 29, 2003 09:51 AM

i am fairly new at windows forms and i am getting this error when resetting my data datagrid. does anyone have any experience with this error message? System.NotSupportedException: Culture "en" is a neutral culture. It can not be used in formatting and parsing and therefore cannot be set as the thread's current culture. thank you, -jim

Administrator [Syncfusion]
Replied On July 29, 2003 11:56 AM

Is this with an Essential Grid you are getting this message? Can you post a little sample project showing what you are doing?

Administrator [Syncfusion]
Replied On July 29, 2003 12:07 PM

yes, this is essential grid. i don't get the error when using the basic datagrid. if i remove this line from my login screen Thread.CurrentThread.CurrentUICulture = new CultureInfo("en"); everything seems to work fine. but once i add that line back in, i get the following stack trace System.NotSupportedException: Culture "en" is a neutral culture. It can not be used in formatting and parsing and therefore cannot be set as the thread's current culture. at System.Globalization.CultureInfo.CheckNeutral(CultureInfo culture) at System.Globalization.CultureInfo.get_NumberFormat() at Syncfusion.Windows.Forms.Grid.GridCellRendererBase.OnValidate() at Syncfusion.Windows.Forms.Grid.GridCurrentCell.Validate() catched at Syncfusion.Windows.Forms.Grid.GridCurrentCell.Validate() in :line 0 System.NotSupportedException: Culture "en" is a neutral culture. It can not be used in formatting and parsing and therefore cannot be set as the thread's current culture. at Syncfusion.Windows.Forms.Grid.GridCurrentCell.Validate() at Syncfusion.Windows.Forms.Grid.GridCurrentCell.ConfirmChanges(Boolean closeDropDown) System.NotSupportedException: Culture "en" is a neutral culture. It can not be used in formatting and parsing and therefore cannot be set as the thread's current culture. at Syncfusion.Windows.Forms.Grid.GridCurrentCell.ConfirmChanges(Boolean closeDropDown) at Syncfusion.Windows.Forms.Grid.GridCurrentCell.ConfirmChanges() at Syncfusion.Windows.Forms.Grid.GridCurrentCell.Deactivate(Boolean discardChanges) System.NotSupportedException: Culture "en" is a neutral culture. It can not be used in formatting and parsing and therefore cannot be set as the thread's current culture. at Syncfusion.Windows.Forms.Grid.GridCurrentCell.Deactivate(Boolean discardChanges) at Syncfusion.Windows.Forms.Grid.GridCurrentCell.MoveTo(Int32 rowIndex, Int32 colIndex, GridSetCurrentCellOptions options, Boolean discardChanges) at Syncfusion.Windows.Forms.Grid.GridCurrentCell.MoveTo(Int32 rowIndex, Int32 colIndex, GridSetCurrentCellOptions options) at Syncfusion.Windows.Forms.Grid.GridInternal.GridSelectCellsMouseController.MouseDown(MouseEventArgs e) at Syncfusion.Windows.Forms.MouseControllerDispatcher.ProcessMouseDown(MouseEventArgs e) at Syncfusion.Windows.Forms.ScrollControllMouseControllerDispatcher.ScrollControlBeforeMouseDown(Object sender, CancelMouseEventArgs e) at Syncfusion.Windows.Forms.ScrollControl.OnScrollControlMouseDown(CancelMouseEventArgs e) at Syncfusion.Windows.Forms.Grid.GridControlBase.OnScrollControlMouseDown(CancelMouseEventArgs e) at Syncfusion.Windows.Forms.ScrollControl.RaiseCancelMouseEvent(MouseEventArgs e, CancelMouseDelegate d) System.NotSupportedException: Culture "en" is a neutral culture. It can not be used in formatting and parsing and therefore cannot be set as the thread's current culture. at System.Globalization.CultureInfo.CheckNeutral(CultureInfo culture) at System.Globalization.CultureInfo.get_NumberFormat() at Syncfusion.Windows.Forms.Grid.GridCellRendererBase.OnValidate() at Syncfusion.Windows.Forms.Grid.GridCurrentCell.Validate() catched at Syncfusion.Windows.Forms.Grid.GridCurrentCell.ConfirmChanges(Boolean closeDropDown) in :line 0 catched at Syncfusion.Windows.Forms.Grid.GridCurrentCell.Deactivate(Boolean discardChanges) in :line 0 catched at Syncfusion.Windows.Forms.ScrollControl.RaiseCancelMouseEvent(MouseEventArgs e, CancelMouseDelegate d) in :line 0 catched at Syncfusion.Windows.Forms.Grid.GridCurrentCell.Validate() in :line 0 any ideas? thank you.

Administrator [Syncfusion]
Replied On July 30, 2003 02:22 AM

The grid uses the CultureInfo to do formatting for cell values like integers or doubles or ... And specifying "en" without a Country\Region does not support formatting. So, if you specify the Country as well, "en-US", then the formatting is permitted, and you will not get the exceptions. Another option is to use System.Globalization.CultureInfo.InvariantCulture. It is a type of culture that is culture-insensitive. It is associated with the English language but not with a country or region.

Administrator [Syncfusion]
Replied On July 30, 2003 10:10 AM

thank you, clay, it worked just like you said.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;