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
4165
CalcManager Cells are empty after Adapter Refresh
posted

Hi,

We have a number of grids that have formulas that calculate a total cost. (Quantity * Cost).

They work great in every case except one:

In the work completed method of a background worker we have a refresh of the grids with the data adapter by clearing the rows then filling.

table.Rows.Clear();

adapter.Fill(table);

Before this happens we suspend the calcmanager, then resume right after.

   ucManager.SuspendCalc();

//refresh grid

ucManager.ResumeCalc();

ucManager.ReCalc();

The cells for the grid which are the formula though are blank. 

As a test I put in the AfterExitEditMode event the same lines:

ucManager.ResumeCalc();

ucManager.ReCalc();

Once you click in a cell then out the values all come back:

I read here 

https://help.infragistics.com/Help/Doc/WinForms/2012.2/CLR4.0/html/Infragistics4.Win.UltraWinCalcManager.v12.2~Infragistics.Win.UltraWinCalcManager.UltraCalcManager~SuspendCalc.html

that suspend stacks so you need to call the same # of recalcs. I made sure that Suspend is only called once in the above example.

I feel like I am missing something simple. What do you think?

Thanks,
M.

Parents Reply Children
No Data