After upgrading my project I get an error on some grids after i click a cell and then close the form that the grid is on. I cannot find the cause anywhere. I just single click a cell that is readonly, then close the form with the windows X and the error comes up. A try Catch in the form closing doesnt catch it.
This is critical so please let me know quickly if you have any clue what the problem is.
The error is:
Object reference not set to an instance of an object.
StackTrace: at Infragistics.Win.UltraWinGrid.UltraGridColumn.get_IsFirstVisibleColumnOnLevel()
at Infragistics.Win.UltraWinGrid.UltraGridCell.CalculateCellOverlayRect(UIElement element, Int32 borderWidth, Boolean calculateInvalidRect)
at Infragistics.Win.UltraWinGrid.UltraGridCell.InvalidateElem(UIElement element, Boolean recalcRects)
at Infragistics.Win.UltraWinGrid.GridItemBase.InvalidateItem(RowScrollRegion rsr, ColScrollRegion csr, Boolean recalcRects)
at Infragistics.Win.UltraWinGrid.GridItemBase.InvalidateItem()
at Infragistics.Win.UltraWinGrid.UltraGrid.InvalidateActiveRowCell()
at Infragistics.Win.UltraWinGrid.UltraGrid.OnLostFocus(EventArgs e)
at System.Windows.Forms.Control.WmKillFocus(Message& m)
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)
There is also another error I get when trying to open the Designer for the form.
Object of type 'Infragistics.Win.UltraWinGrid.UltraGrid' cannot be converted to type 'Infragistics.Win.UltraWinGrid.UltraGrid'.
Hello,This definitely look like a reference issue. So can you please try to recheck again all your references. They all should point to one location I recommend to use it form GAC. It may possible there is a other component that refer to UltraWinGrid and is with the older version. Recheck also your license file and delete the whole content. Rebuild your project. If this doesn’t help you , then delete the whole content of bin and debug directory and remove all references and add them again. Then again rebuild your project, but first close all forms.Let me know if this solve your problem.Sincerely,DimiDeveloper Support EngineerInfragistics, Inc.
I deleted everything. I was already pulling from the GAC. I have just noticed however that there are 2 of each control in the GAC with the same name, but one is version 1003 and one is 2017. Are both the release and the hotfix dll supposed to be in the GAC? In the meantime, I am removing the whole release and reinstalling it. There is still one issue that I need clarified that I dont believe has anything to do with the references. In another project, things work fine so far except for the form closing event. I need to set focus to a control other than the wingrid on formclosing or else a null object reference occurs if the grid has focus on formclosing.