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

NullReferenceException after upgrade to 2009Q1

1 Answer 55 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Edwin
Top achievements
Rank 1
Edwin asked on 16 Apr 2009, 01:53 AM
Hi

After upgrading my project to 2009Q1, my winform with RadGridView cannot be loaded.  The exception is

System.NullReferenceException was unhandled
  Message="Object reference not set to an instance of an object."
  Source="Telerik.WinControls.GridView"
  StackTrace:
       at Telerik.WinControls.UI.GridDataCellElement.MeasureOverride(SizeF availableSize)
       at Telerik.WinControls.UI.GridHeaderCellElement.MeasureOverride(SizeF availableSize)
       at Telerik.WinControls.RadElement.MeasureCore(SizeF availableSize)
       at Telerik.WinControls.RadElement.Measure(SizeF availableSize)
       at Telerik.WinControls.RadElement.MeasureOverride(SizeF availableSize)
       at Telerik.WinControls.UI.LightVisualElement.MeasureOverride(SizeF availableSize)
       at Telerik.WinControls.UI.GridTableHeaderRowElement.MeasureOverride(SizeF availableSize)
       at Telerik.WinControls.RadElement.MeasureCore(SizeF availableSize)
       at Telerik.WinControls.RadElement.Measure(SizeF availableSize)
       at Telerik.WinControls.RadElement.MeasureOverride(SizeF availableSize)
       at Telerik.WinControls.UI.LightVisualElement.MeasureOverride(SizeF availableSize)
       at Telerik.WinControls.UI.GridTableBodyElement.MeasureOverride(SizeF availableSize)
       at Telerik.WinControls.RadElement.MeasureCore(SizeF availableSize)
       at Telerik.WinControls.RadElement.Measure(SizeF availableSize)
       at Telerik.WinControls.UI.GridTableElement.MeasureOverride(SizeF availableSize)
       at Telerik.WinControls.RadElement.MeasureCore(SizeF availableSize)
       at Telerik.WinControls.RadElement.Measure(SizeF availableSize)
       at Telerik.WinControls.RootRadElement.MeasureOverride(SizeF availableSize)
       at Telerik.WinControls.RootRadElement.MeasureCore(SizeF availableSize)
       at Telerik.WinControls.RadElement.Measure(SizeF availableSize)
       at Telerik.WinControls.ComponentLayoutElementTree.GetPreferredSize(Size sizeConstraints)
       at Telerik.WinControls.RadControl.GetPreferredSize(Size proposedSize)
       at System.Windows.Forms.Layout.TableLayout.InflateColumns(ContainerInfo containerInfo, Size proposedConstraints, Boolean measureOnly)
       at System.Windows.Forms.Layout.TableLayout.ApplyStyles(ContainerInfo containerInfo, Size proposedConstraints, Boolean measureOnly)
       at System.Windows.Forms.Layout.TableLayout.LayoutCore(IArrangedElement container, LayoutEventArgs args)
       at System.Windows.Forms.Layout.LayoutEngine.Layout(Object container, LayoutEventArgs layoutEventArgs)
       at System.Windows.Forms.Control.OnLayout(LayoutEventArgs levent)
       at System.Windows.Forms.ScrollableControl.OnLayout(LayoutEventArgs levent)
       at System.Windows.Forms.TableLayoutPanel.OnLayout(LayoutEventArgs levent)
       at System.Windows.Forms.Control.PerformLayout(LayoutEventArgs args)
       at System.Windows.Forms.Control.PerformLayout()
       at PopularIT.MOSES.POS.UI.frmInvList.InitializeComponent() in C:\Projects\MOSES.POS\MOSES.POS\UI\frmInvList.Designer.cs:line 610
       at PopularIT.MOSES.POS.UI.frmInvList..ctor() in C:\Projects\MOSES.POS\MOSES.POS\UI\frmInvList.cs:line 21
       at PopularIT.MOSES.POS.UI.frmMain.btnInvList_Click(Object sender, EventArgs e) in C:\Projects\MOSES.POS\MOSES.POS\UI\frmMain.cs:line 126
       at System.Windows.Forms.Control.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ButtonBase.WndProc(Message& m)
       at System.Windows.Forms.Button.WndProc(Message& m)
       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(Int32 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 PopularIT.MOSES.POS.Program.Main() in C:\Projects\MOSES.POS\MOSES.POS\Program.cs:line 82
       at System.AppDomain._nExecuteAssembly(Assembly 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)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException:

It worked before upgrade.  What is wrong?
Edwin 

1 Answer, 1 is accepted

Sort by
0
Nick
Telerik team
answered on 17 Apr 2009, 04:00 PM
Hello Edwin,

Thank you for contacting us. Is this at design time or run time? If the former please follow the instructions in our help for your project update.

If the latter, please send us your project so we can check for the reason and offer the best solution. Please note that you need to start a new support ticket so that you can attach files. Thank you very much in advance.

Sincerely yours,
Nick
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
GridView
Asked by
Edwin
Top achievements
Rank 1
Answers by
Nick
Telerik team
Share this question
or