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
  • 34810
    Verified Answer
    Offline posted

    Hello Michael,

    I have been investigating into the behavior you are reporting, but after creating a sample project based on the code you have provided, I cannot seem to reproduce it. One thing I am curious about in this case is whether or not you may have DeferredCalculationsEnabled set to “True.” If so, something you may be able to try to get around this is to set this property to “False.”

    I have attached the sample project I used to test this.  Please test this project on your PC; whether or not it works correctly may help indicate the nature of this problem.

    If the project does not work correctly, this indicates either a problem possibly specific to your environment, or a difference in the DLL versions we are using.  My test was performed using version 20.1.20201.42 in Infragistics for Windows Forms 2020 Volume 1.

    If the project does show the product feature working correctly, this indicates a possible problem in the code of your application.  It will help if you can provide a small, isolated sample application that demonstrates the behavior you are seeing.

    Or, if this sample project is not an accurate demonstration of what you're trying to do, please feel free to modify it and send it back, or send a small sample project of your own if you have one.

    Please let me know if you have any other questions or concerns on this matter.

    UltraGridCalcManDemo.zip

Reply Children