Hi guys - I'm evaluating the new version of IG Winforms and I'm hitting bug after bug. I've managed to work around a bunch, but this is getting frustrating. Now I get the following
Index was outside the bounds of the array.
at Infragistics.Collections.MDList`1.get_Item(Int32 row, Int32 column)
at Infragistics.Controls.Grids.Core.ExcelSheetPaneManager.VerifyPaneInfoImpl() at Infragistics.Controls.Grids.Core.ExcelSheetPaneManager.VerifyPaneInfo() at Infragistics.Controls.Grids.Core.ExcelSheetPaneManager.Measure(Size availableSize) at Infragistics.Controls.Grids.Core.SpreadsheetAreaLayoutManager.Measure(Size availableSize) at Infragistics.Win.UltraWinSpreadsheet.UIElements.SpreadsheetAreaUIElement.WfSpreadsheetAreaLayoutManager.Measure(Size availableSize) at Infragistics.Win.UltraWinSpreadsheet.UIElements.SpreadsheetAreaUIElement.PositionChildElements() at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive) at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive) at Infragistics.Win.UIElement.DrawHelper(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode, Boolean clipText, Boolean forceDrawAsFocused, Boolean preventAlphaBlendGraphics) at Infragistics.Win.UIElement.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode, Boolean forceDrawAsFocused, Boolean preventAlphaBlendGraphics) at Infragistics.Win.ControlUIElementBase.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode, Size elementSize, Boolean preventAlphaBlendGraphics) at Infragistics.Win.ControlUIElementBase.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode, Size elementSize) at Infragistics.Win.ControlUIElementBase.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode) at Infragistics.Win.UltraControlBase.OnPaint(PaintEventArgs pe) at Infragistics.Win.UltraWinSpreadsheet.UltraSpreadsheet.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.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)
Here's what I'm doing: I build a workbook in a non-UI thread. Then, in the UI thread, I open a win form that just has the UltraSpreadsheet control on it. Everything looks great- I can scroll around, switch tabs, etc. Then I move the window to monitor two and BANG! nasty error. After I get this error, I can no longer build any more excel reports - I get the same error. I'm aware the controls are not thread-safe, but could this be the workbook not thread safe?
Hello,
I apologize I did not include the link. Here it is: http://es.infragistics.com/community/forums/p/15832/57635.aspx#57635
Hi, did you have a link to the other thread?
If not, no worries, I think I can probably figure out marshaling it.
Thanks.
The issue is similar to the one found on this thread, please look there for more info. The act of setting the UltraSpreadsheet's workbook to a workbook created in a non-UI thread without marshaling it onto the UI thread, the UltraSpreadsheet encounters the same unstable behavior as was discussed on that forum thread when a grid is set to a datasource from outside the UI thread. The workbook must be marshaled onto the UI thread for a UI control to use it.