Hello,
I have encountered this exception when handling KeyPress event. I am from Czech Republic and we have specific characters, for example: ˇ - it's KeyChar 711 (examining KeyPressEventArgs in standard GridView control which lacks the bug). However when trying to type this character on RadGridView the exception is thrown.
The only solution that I can think of right now is overriding PreProcessMessage or ProcessDialogKey on RadGridView subclass - so not allowing the characters to be passed to the application (so as not to get the exception) I have not try it just yet though.
System.OverflowException was unhandled
Message="Value was either too large or too small for an Int32."
Source="mscorlib"
StackTrace:
v System.Convert.ToChar(Int32 value)
v Telerik.WinControls.UI.BaseGridBehavior.ProcessAlphaNumericKey(KeyEventArgs keys)
v Telerik.WinControls.UI.BaseGridBehavior.ProcessKey(KeyEventArgs keys)
v Telerik.WinControls.UI.RadGridView.ProcessDialogKey(Keys keyData)
v System.Windows.Forms.Control.PreProcessMessage(Message& msg)
v System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg)
v System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)
v System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FPreTranslateMessage(MSG& msg)
v System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
v System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
v System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
v System.Windows.Forms.Application.Run(Form mainForm)
v WindowsFormsApplication2.Program.Main() v C:\Users\nguyen\Documents\Visual Studio 2008\Projects\WindowsFormsApplication2\WindowsFormsApplication2\Program.cs:řádek 18
v System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
v System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
v Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
v System.Threading.ThreadHelper.ThreadStart_Context(Object state)
v System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
v System.Threading.ThreadHelper.ThreadStart()
InnerException:
I have encountered this exception when handling KeyPress event. I am from Czech Republic and we have specific characters, for example: ˇ - it's KeyChar 711 (examining KeyPressEventArgs in standard GridView control which lacks the bug). However when trying to type this character on RadGridView the exception is thrown.
The only solution that I can think of right now is overriding PreProcessMessage or ProcessDialogKey on RadGridView subclass - so not allowing the characters to be passed to the application (so as not to get the exception) I have not try it just yet though.
System.OverflowException was unhandled
Message="Value was either too large or too small for an Int32."
Source="mscorlib"
StackTrace:
v System.Convert.ToChar(Int32 value)
v Telerik.WinControls.UI.BaseGridBehavior.ProcessAlphaNumericKey(KeyEventArgs keys)
v Telerik.WinControls.UI.BaseGridBehavior.ProcessKey(KeyEventArgs keys)
v Telerik.WinControls.UI.RadGridView.ProcessDialogKey(Keys keyData)
v System.Windows.Forms.Control.PreProcessMessage(Message& msg)
v System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg)
v System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)
v System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FPreTranslateMessage(MSG& msg)
v System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
v System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
v System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
v System.Windows.Forms.Application.Run(Form mainForm)
v WindowsFormsApplication2.Program.Main() v C:\Users\nguyen\Documents\Visual Studio 2008\Projects\WindowsFormsApplication2\WindowsFormsApplication2\Program.cs:řádek 18
v System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
v System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
v Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
v System.Threading.ThreadHelper.ThreadStart_Context(Object state)
v System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
v System.Threading.ThreadHelper.ThreadStart()
InnerException: