I would like to suspend wincalc calculations and show values which are stored in the cells.
When I reload grid with suspended calculations all cells with formulas are blank.
is there a way to show cell value when calculation is suspended?
Hello Arthur,
I`m not sure that I understand well your scenario, but maybe one possible approach could be if you apply your Formula at a lates stage. For example: I have column (the column`s name is Formula 5 -please take a look at the attached video file) which display the values from my datasource. When I press the button, I set Formula to that column and call the methods:
- ultraCalcManager1.DirtyAllFormulas();
- ultraCalcManager1.ReCalc();
By this way I get the new values (diffrent from the values in dataSource). Please take a look at the attached video file and let me know if you think that I misunderstand your questions
Regards
My scenario as a bit different:
1 all formulas are created in designer and attached to certain columns.
2 user opens window, first I load values from datasource, then during calculations values that are changes are highlighted
3 user can now save or cancel changes
4 when cancelling I would like to suspend calculations and show previous values (stored in datasource)
5 On cell change, calculations are resumed and all changed values are displayed, goto point 3
So far I managed to suspend calculations when user pressed cancel and resume on cell change. During that time all calculated fields are empty, which is confusing.
I could dynamically create formulas and attach them on form load, detach on cancel and attach again on cell change....
Any idea on easier solution to show values from datasource when calculations are suspended?
Hello Artur,
If you need any additional assistance don’t hesitate to write us
Hi,
I think what you are trying to do here is going to be extremely difficult. If you apply a formula to a column, the grid is going to treat that column and all of it's cells as the target of a formula. So having that column behave as a formula target sometimes and not others it's not something the grid is prepared to handle.
It seems like when you say "cancel" here, you really mean "reset". So you have a sort've form that the user fills out and certain calculations are performed, but then the user can reset and start over with a new set of values. If that's what you want, then I think Georgi's suggestion makes sense. Don't apply the formulas at design-time. Start off with a clean grid with no formulas and only add the formulas once the user begins editing. When you reset, you remove the formulas and start fresh.