The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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.
ADAdministrator 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.