Hello Infragistics team,
I am using UltraCalcManager in Grid columns and the calculated value is expected to update back to database (for some reasons, the calculation cannot be done in db directly). for performance consideration, I want to use Asynchronous mode formula calculation and don't want user to click "Upload" button before all calculations is completed. So I registered CalculationsCompleted event and set DeferredCalculationsEnabled to false. This way I can count how many columns calculation has completed and if it equals the count of formula column, "Upload" button can be enabled.
My problem is when user clicks cells used by formula or with formula, event CalculationsCompleted is triggered and there is no event argument for me to distinguish column calculation complete and cell click. Can you please advise how I can know formula column calculation completion in Asynchronous mode? thanks a lot in advance!
Kind Regards,
Russell
Hi Atanas,
Thanks for following up. I took Mike's advice however it doesn't resolve the problem. If I move the force calculation before committing upload, user will notice that uploaded row count is more that the changed rows.
Basiclly, what I want to achieve is render data faster when initial data population happens and before user can upload data back, the calculation has to complete. if this cannot be achieved, I will have to continue to user Synchronous calculation which has a great impact on data rendering performance.
Hello Russell,
I am just checking about the progress of this issue. Let me know If you need our further assistance on this issue?
Thank you for using Infragistics Components.
Hi Russell,
I don't think there is any way to do this. There's no way to detect when the grid calculations are done, as opposed to a single calculation that was triggered by an edit. Although, I would think that if the control is already in the process of calculating all of the cells and you edit one, that should trigger an extra CalculationsCompleted event just for the edit calculations.
Calculations are sort've an ongoing process, though, so it's a little strange to talk about when they are "done" especially in an asynchonous scenario.
Maybe instead of not allowing the user to save until the calculations are complete, you could allow the user to save at any time, and then just force the completion of the calculations synchronously before you do the save:
CalcFrequency originalCalcFrequency = thisraCalcManager1.CalcFrequency; this.ultraCalcManager1.CalcFrequency = CalcFrequency.Manual; try { this.ultraCalcManager1.ReCalc(); } finally { this.ultraCalcManager1.CalcFrequency = originalCalcFrequency; }
This might mean that the save takes a long time, but the user will have to wait, anyway, and at least this way, they know what they are waiting for.