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
100
How to force all formulas to recalculate on demand in UltraGrid?
posted

Hi. I am using WinForms v17.2 and have a UltraWinGrid with about 5000 rows and 90 columns. Many of the columns are calculated asynchronously with formulas set via the CalcManager. Before doing any operations, like export, I need to make sure all the calculations are done. This is the code, which should ensure this, but it's not working for some reason. What am I missing?

Dim CalcManager As Infragistics.Win.UltraWinCalcManager.UltraCalcManager = Me.MyGrid.CalcManager
CalcManager.DeferredCalculationsEnabled = False
CalcManager.CalcFrequency = UltraWinCalcManager.CalcFrequency.Manual
CalcManager.DirtyAllFormulas()
CalcManager.ReCalc()
CalcManager.DeferredCalculationsEnabled = True
CalcManager.CalcFrequency = UltraWinCalcManager.CalcFrequency.Asynchronous

Me.MyGrid.Refresh()
Me.MyGrid.UpdateData()

Thanks in advance!

Parents Reply Children
No Data