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
145
Memory problems when using UltraChart in UltragridCells
posted

Hi,

I try to use ultraChart-controls in rows (about 5.000) of an ultragrid. The charts are computed in the InitializeRow-event of the grid, which calls the following method:

Private Sub SetChartControl(ByRef pRow As UltraGridRow, pValueList As List(Of Decimal))

Dim ucce As New Infragistics.Win.UltraWinEditors.UltraControlContainerEditor()

Dim dt As New DataTable
dt.Columns.Add("1", GetType(Decimal))
dt.Columns.Add("2", GetType(Decimal))
dt.Columns.Add("3", GetType(Decimal))

dt.Rows.Add(pValueList.Item(0), pValueList.Item(1), pValueList.Item(3))

Dim uc As New Infragistics.Win.UltraWinChart.UltraChart()
uc.ChartType = ChartType.LineChart
uc.DataSource = dt
uc.DataBind()

ucce.RenderingControl = uc
pRow.Cells("Orders").EditorComponent = ucce

End Sub

This leads to memory problems (SystemOutOfMemoryExceptions).
What's the best way to get the desired result without the memory leaks?

Thank you very much.
Regards, Marco

Parents Reply Children
No Data