Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
350
System.NullReferenceException when i'm trying to AutoResize a column
posted

Hi there,

I got a serious problem with my UltraWinGrid: When I double-click on a side of a header column to auto-resize it, a System.NullReferenceException occurs:

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
   at Infragistics.Win.UltraWinGrid.RowAutoSizeLayoutManagerHolder.VerifyCachedLayoutManager()
   at Infragistics.Win.UltraWinGrid.RowAutoSizeLayoutManagerHolder.get_RowLayoutPreferredSize()
   at Infragistics.Win.UltraWinGrid.UltraGridFilterRow.get_BaseHeight()
   at Infragistics.Win.UltraWinGrid.UltraGridRow.get_HeightInsideRowBorders()
   at Infragistics.Win.UltraWinGrid.UltraGridColumn.CalculateCellTextWidth(UltraGridRow row, Graphics gr, StringFormat stringFormat, Int32 maxColWidth)
   at Infragistics.Win.UltraWinGrid.UltraGridColumn.CalculateMaxCellTextWidth(Int32 maxColWidth, RowsCollection rows, Int32 nRows, Int32 maxRowsCollections)
   at Infragistics.Win.UltraWinGrid.UltraGridColumn.PerformAutoResizeHelper(RowsCollection rows, Int32 nRows, Boolean applyWidth, Boolean includeHeader, Boolean includeCells, Int32 maxRowsCollections)
   at Infragistics.Win.UltraWinGrid.UltraGridColumn.PerformAutoResizeHelper(RowsCollection rows, Int32 nRows, Boolean applyWidth, Boolean includeHeader, Boolean includeCells)
   at Infragistics.Win.UltraWinGrid.UltraGridBand.AutoResizeLayoutItem(ILayoutItem autoResizeItem, RowsCollection rowsContext, Size containerSize, UIElement elem)
   at Infragistics.Win.UltraWinGrid.HeaderUIElement.OnDoubleClick(Boolean adjustableArea)
   at Infragistics.Win.ControlUIElementBase.ProcessDoubleClick(Object sender, EventArgs e)
   at Infragistics.Win.Utilities.ProcessEvent(Control control, ProcessEvent eventToProcess, EventArgs e)
   at Infragistics.Win.UltraControlBase.OnDoubleClick(EventArgs e)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.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.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
 
Please do not ask me to post a bug on infragistics again...

 

Parents
No Data
Reply
  • 45049
    posted

    One of two things has likely occurred.  Either you're using threading in your application and are updating the UI (directly or indirectly) on a background thread, or you've encountered a bug in the product.

    If you're not using threading, and the problem persists in the latest hot fix for the version of the toolset you're using, then I suggest you submit a support request so that we can investigate in more detail.

Children