Hi guys,
Sometimes when printing an ultragrid we're getting the following exception:
Index was outside the bounds of the array. at Infragistics.Win.UltraWinGrid.PrintManager.AddLogicalPrintPage(UltraGridRow row, Int32 scrollOffset) at Infragistics.Win.UltraWinGrid.PrintManager.CalculateFirstRows() at Infragistics.Win.UltraWinGrid.PrintManager.CalculatePageDimensions() at Infragistics.Win.UltraWinGrid.PrintManager.BeginPrint(Object sender, PrintEventArgs e) at System.Drawing.Printing.PrintDocument.OnBeginPrint(PrintEventArgs e) at System.Drawing.Printing.PrintDocument._OnBeginPrint(PrintEventArgs e) at System.Drawing.Printing.PrintController.Print(PrintDocument document) at System.Drawing.Printing.PrintDocument.Print() at Infragistics.Win.UltraWinGrid.UltraGrid.Print(UltraGridLayout layout, PrintDocument printDocument, RowPropertyCategories retainRowPropertyCategories) at Infragistics.Win.UltraWinGrid.UltraGrid.Print(UltraGridLayout layout)
This exception happens only for landscape printing with a filter for some column in the grid. The exception is sporadic and doesn't happen everytime
Any suggestions?
Hi,
What version of the controls are you using?
My first guess would be that you are using threading here. Are you, perhaps, trying to print the grid on a separate (background) thread?
Hi Mike,
I'm using version 10.1.
No threading this time, maybe something in the UltraGridLayout is causing it?
Well, if you are not using threading, then it's probably a bug in v10.1 of the grid. You could try getting the latest service release, if you don't already have it.
How to get the latest service release - Infragistics Community