We recently encountered the same issue reported in the below thread.
http://ko.infragistics.com/community/forums/p/32111/488193.aspx#488193
System.InvalidCastException: Unable to cast object of type 'Infragistics.Win.UltraWinGrid.UltraGridRow' to type 'Infragistics.Win.UltraWinGrid.UltraGridGroupByRow'.
at Infragistics.Win.UltraWinGrid.RowsCollection.SyncRows_Add(UltraGridRow row, Int32 desiredIndex)
at Infragistics.Win.UltraWinGrid.RowsCollection.SyncRowsHelper(IList boundList)
at Infragistics.Win.UltraWinGrid.RowsCollection.SyncRows()
at Infragistics.Win.UltraWinGrid.RowsCollection.VerifyGroupByVersionHelper()
at Infragistics.Win.UltraWinGrid.UltraGridRow.get_ParentRow()
at Infragistics.Win.UltraWinGrid.UltraGridRow.get_HiddenResolved()
at Infragistics.Win.UltraWinGrid.RowScrollRegion.get_FirstRow()
at Infragistics.Win.UltraWinGrid.RowScrollRegion.GetMaxScrollPosition(Boolean scrollToFill)
at Infragistics.Win.UltraWinGrid.RowScrollRegion.RegenerateVisibleRows(Boolean resetScrollInfo)
at Infragistics.Win.UltraWinGrid.RowScrollRegion.WillScrollbarBeShown(ScrollbarVisibility assumeColScrollbarsVisible)
at Infragistics.Win.UltraWinGrid.RowScrollRegionsCollection.AreScrollbarsVisible(ScrollbarVisibility assumeColScrollbarsVisible)
at Infragistics.Win.UltraWinGrid.ColScrollRegion.ResetScrollInfo()
at Infragistics.Win.UltraWinGrid.ColScrollRegion.RegenerateVisibleHeaders()
at Infragistics.Win.UltraWinGrid.ColScrollRegionsCollection.InitializeMetricsHelper()
at Infragistics.Win.UltraWinGrid.ColScrollRegionsCollection.InitializeMetrics()
at Infragistics.Win.UltraWinGrid.RowScrollRegion.PositionScrollbar(Boolean resetScrollInfo)
at Infragistics.Win.UltraWinGrid.RowScrollRegion.SetOriginAndExtent(Int32 origin, Int32 extent)
at Infragistics.Win.UltraWinGrid.DataAreaUIElement.ResizeRowScrollRegions()
at Infragistics.Win.UltraWinGrid.DataAreaUIElement.PositionChildElements()
at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive)
at Infragistics.Win.UltraWinGrid.DataAreaUIElement.set_Rect(Rectangle value)
at Infragistics.Win.UltraWinGrid.UltraGridUIElement.PositionChildElements()
at Infragistics.Win.UltraWinGrid.UltraGridUIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive)
at Infragistics.Win.UIElement.VerifyChildElements(Boolean recursive)
at Infragistics.Win.UltraWinGrid.UltraGridUIElement.InternalInitializeRect(Boolean verify)
at Infragistics.Win.UltraWinGrid.UltraGridLayout.GetUIElement(Boolean verify, Boolean forceInitializeRect)
at Infragistics.Win.UltraWinGrid.UltraGrid.OnPaint(PaintEventArgs pe)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam): Unable to cast object of type 'Infragistics.Win.UltraWinGrid.UltraGridRow' to type 'Infragistics.Win.UltraWinGrid.UltraGridGroupByRow'.
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
It is not so easy to reproduce. Sometimes it occurs when the grid view is brought to front. What could be the cause of this error?
Hi Amber,
Thank you for posting in our forums.
Looking in our internal issue tracking system a similar issue resolved in version 9.2 and higher. If you are using an older version, my suggestion to you is to upgrade it and see if the issue is resolved. Note that you can use the 15.1 trial in order to evaluate if your issue is indeed resolved in it.
Please let me know if you have any additional questions.
Hi, I am facing the above issue and I am using "Infragistics4.Win.UltraWinGrid.v14.2.dll", can somebody please help to resolve this issue?