Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1180
Ultragrid.Print funcion causing memory issue
posted

Hi Team,

We are using _grid.Print(UltragridLayout_, PrintDocument_, RowPropertyCategories.Hidden) to print out the grid.

However, we found the memory increased everytime after we do a printing opertaion and making our application stale if a large amout of grid is printed. The memory won't go down even after printing finished.

I did a profiling for the printing function, I found everytime after printing finished, the UltraColumns will be doubled in the grid. Below is the stack trace to show how this duplicated columns are generated.(tried on both infragistic 8.2 and 9.1)

UltraGridBand.InitColumns(UltraGridBand[])
UltraGridBand.InitListManager(BindingManagerBase, string, UltraGridBand[])
UltraGridColumn.InitPropertyDescriptor(PropertyDescriptor, UltraGridBand[])
UltraGridBand.InitColumns(UltraGridBand[])
UltraGridBand.InitListManager(BindingManagerBase, string, UltraGridBand[])
UltraGridLayout.ListManagerUpdated(BindingManagerBase)
UltraGridLayout.ListManagerUpdated()
UltraGrid.PrintHelper(UltraGridLayout, PrintDocument, RowPropertyCategories)
UltraGrid.Print(UltraGridLayout, PrintDocument, RowPropertyCategories)

Any idea what's the reason for this and how to fix it?

Many Thanks,

Xin