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)
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.
Hi Vince and thanks for your answer.
I am effectively using threads in my application, but nothing at the moment that update the UI. Just some data recuperation.
I continue to investigate this way to see if the UI is indirectly modified.
Regards.
Ivynox said:I am effectively using threads in my application, but nothing at the moment that update the UI. Just some data recuperation.
Sometimes, operations that cross threads are not so obvious. If you are modifyng the data source that is bound to the grid on another thread in any way, then that data source might be sending notifications to the grid from the other thread and this could cause a problem like the one you are getting.
Hi Mike,
I've monitored during hours if my grid's datasource were changed: Negative.
I should post abug request on infra...
PS: Don't change the status of my posts in "Answered" if it's not true for now. It's not the first time that it happened. Thanks.
Hi i got the same problem... any ideia how to fix
Thanks