This is a migrated thread and some comments may be shown as answers.

null exception in program.cs due to show dialog

2 Answers 206 Views
Treeview
This is a migrated thread and some comments may be shown as answers.
Harshvardhan
Top achievements
Rank 1
Harshvardhan asked on 09 May 2012, 12:52 PM
Hi Team,

I have been facing this issue, whenever i show a dialog or a messagebox in the valuevalidating event . I get a null exception error in
the program.cs file . but this does not occuur if i show the dialog in anyother event .please let me know the solution for this.

Regards
Harsh

2 Answers, 1 is accepted

Sort by
0
Harshvardhan
Top achievements
Rank 1
answered on 09 May 2012, 01:26 PM
Here is the detailed exception tht is thrown

System.NullReferenceException was unhandled
  Message=Object reference not set to an instance of an object.
  Source=Telerik.WinControls.UI
  StackTrace:
       at Telerik.WinControls.UI.RadTreeViewElement.EndEditCore(Boolean commitChanges)
       at Telerik.WinControls.UI.TreeViewTextBoxEditor.OnKeyDown(KeyEventArgs e)
       at Telerik.WinControls.UI.BaseTextBoxEditor.TextBoxItem_KeyDown(Object sender, KeyEventArgs e)
       at System.Windows.Forms.KeyEventHandler.Invoke(Object sender, KeyEventArgs e)
       at Telerik.WinControls.RadItem.OnKeyDown(KeyEventArgs e)
       at Telerik.WinControls.UI.RadTextBoxItem.TextBoxControl_KeyDown(Object sender, KeyEventArgs e)
       at System.Windows.Forms.Control.OnKeyDown(KeyEventArgs e)
       at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
       at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.TextBoxBase.WndProc(Message& m)
       at System.Windows.Forms.TextBox.WndProc(Message& m)
       at Telerik.WinControls.UI.HostedTextBoxBase.WndProc(Message& message)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.Run(Form mainForm)
       at Cognizant.iFrame.UI.Program.Main() in D:\ACoE R&D Team Member\Harsh\development projects\iFrame2.0 new\Source Code\iFrame2.0\Cognizant.iFrame.UI\Program.cs:line 16
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException:
0
Jack
Telerik team
answered on 14 May 2012, 09:28 AM
Hello Harsh,

I am not able to reproduce this issue when using our latest release - Q1 2012 SP1. I recommend you to test this version. If the issue continues to appear, please send us your code and we will research the issue in detail. Thank you in advance.
 
Kind regards,
Jack
the Telerik team
RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
Tags
Treeview
Asked by
Harshvardhan
Top achievements
Rank 1
Answers by
Harshvardhan
Top achievements
Rank 1
Jack
Telerik team
Share this question
or