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. Image for the cookie policy date

Currency TextBox crashing

When deleting a character from the Currency TextBox an unhandled exception occurs: Method: App.MainForm - Void Main() Message: Unhandled Exception System.ArgumentException: String cannot be of zero length. Parameter name: oldValue at System.Text.StringBuilder.Replace(String oldValue, String newValue, Int32 startIndex, Int32 count) at System.Text.StringBuilder.Replace(String oldValue, String newValue) at Syncfusion.Windows.Forms.Tools.CurrencyTextBox.IsDataPosition(String formattedText, Int32 position) at Syncfusion.Windows.Forms.Tools.NumberTextBoxBase.HandleDeleteKey() at Syncfusion.Windows.Forms.Tools.NumberTextBoxBase.Delete() at Syncfusion.Windows.Forms.Tools.NumberTextBoxBase.HandleMenuDeleteClick(Object sender, EventArgs ea) at System.Windows.Forms.MenuItem.OnClick(EventArgs e) at System.Windows.Forms.MenuItem.ShortcutClick() at System.Windows.Forms.Menu.ProcessCmdKey(Message& msg, Keys keyData) at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData) at System.Windows.Forms.Control.PreProcessMessage(Message& msg) at System.Windows.Forms.ThreadContext.System.Windows.Forms.UnsafeNativeMethods+IMsoComponent.FPreTranslateMessage(MSG& msg) at System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.Run(Form mainForm) at App.MainForm.Main() in c:\..path..\mainform.cs:line 798 How do I prevent this from happening? It only seems to happen when I click in the cell and then delete a single character. I also have ValidateValue / NumberRequired set to true. This is v.2.1.0.9.

1 Reply

AD Administrator Syncfusion Team December 7, 2004 02:01 PM UTC

Hi Frances, This is a know issue with version 2.1 but it has been fixed in the latest version. Please create a Direc-Trac incident to receive the download instructions for Version 3.0. Thanks. Best regards, Stephen. >When deleting a character from the Currency TextBox an unhandled exception occurs: > >Method: App.MainForm - Void Main() >Message: Unhandled Exception >System.ArgumentException: String cannot be of zero length. >Parameter name: oldValue > at System.Text.StringBuilder.Replace(String oldValue, String newValue, Int32 startIndex, Int32 count) > at System.Text.StringBuilder.Replace(String oldValue, String newValue) > at Syncfusion.Windows.Forms.Tools.CurrencyTextBox.IsDataPosition(String formattedText, Int32 position) > at Syncfusion.Windows.Forms.Tools.NumberTextBoxBase.HandleDeleteKey() > at Syncfusion.Windows.Forms.Tools.NumberTextBoxBase.Delete() > at Syncfusion.Windows.Forms.Tools.NumberTextBoxBase.HandleMenuDeleteClick(Object sender, EventArgs ea) > at System.Windows.Forms.MenuItem.OnClick(EventArgs e) > at System.Windows.Forms.MenuItem.ShortcutClick() > at System.Windows.Forms.Menu.ProcessCmdKey(Message& msg, Keys keyData) > at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData) > at System.Windows.Forms.Control.PreProcessMessage(Message& msg) > at System.Windows.Forms.ThreadContext.System.Windows.Forms.UnsafeNativeMethods+IMsoComponent.FPreTranslateMessage(MSG& msg) > at System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData) > at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) > at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) > at System.Windows.Forms.Application.Run(Form mainForm) > at App.MainForm.Main() in c:\..path..\mainform.cs:line 798 > >How do I prevent this from happening? It only seems to happen when I click in the cell and then delete a single character. I also have ValidateValue / NumberRequired set to true. > >This is v.2.1.0.9.

Loader.
Live Chat Icon For mobile
Up arrow icon