I use a numeric updown control to allow the users to adjust numeric values to effect a change in my ultragrid. In my ultragrid InitializeLayout event I have the following:
... var band = e.Layout.Bands[0]; band.Columns["CalcMarkup"].Formula = "if ([Markup] > 0, [FinalCost]*([Markup]/100), 0)"; band.Columns["RemainingCost"].Formula = "if([CalcMarkup] > 0, 0, [FinalCost] )"; band.Columns["ForcedMarkup"].Formula = "if([RemainingCost] = 0, 0, ([RemainingCost]/[sumRemCost()])*[force()])"; ... grdMain.DisplayLayout.Bands[0].Summaries.Add("force", "[ForcedAdj()]", SummaryPosition.UseSummaryPositionColumn, grdMain.DisplayLayout.Bands[0].Columns["ForcedMarkup"]); ... var value = 1 - (nudMarginPer.Value/100); _marginFormula = string.Format("( ( ([finCost()]/{0})-sum([FinalCost]) )-sum([CalcMarkup])-5000000 )", "{0}"); band.Summaries.Add("ForcedAdj", string.Format(_marginFormula, value)); band.Summaries["ForcedAdj"].SummaryDisplayArea = SummaryDisplayAreas.None; ... grdMain.DisplayLayout.Bands[0].Summaries.Add("force", "[ForcedAdj()]", SummaryPosition.UseSummaryPositionColumn, grdMain.DisplayLayout.Bands[0].Columns["ForcedMarkup"]);in the numeric updown event: void nudMarginPer_ValueChanged(object sender, EventArgs e) { var value = 1 - (nudMarginPer.Value/100); grdMain.DisplayLayout.Bands[0].Summaries["ForcedAdj"].Formula = string.Format(_marginFormula, value); }
This works well in that when the user presses the updown buttons the summary (ForceAdj) values change and is reflected in the grid summary row. However the column formula for ForcedMarkup doesnt change until a second button press. So now the summary is correct however the value in the cell is off.
My question is this... How do I force the formula for ForcedMarkup (or any column formula) to refresh to reflect the current calcs?
I have tried forcing a grid update, calcmanager recalc, etc... nothing seems to work. I have attached a zip file containing the form.
thanks
Hi Jeff,
Our engineering team is currently looking at this issue. The issue is not addressed and was not included in the last service release. Please let me know if this issue is urgent for you and you have deadline, so I will communicate it in order to be escalated for you.
Its been close to a month now and there has been no reply or status mentioned as to this problem. Is this being looked into? Other than it being shifted to development?
Hello Jeff,
I have asked our engineering staff to examine your issue further. The next step will be for a developer to review my investigation and confirm my findings or to offer a fix, or other resolution.
You can view the status of all development issues connected to this case from the "Development Issues" tab, when viewing this case on the "My Support Requests" page of our website
What is the status on this please?
Hello ,
Thank you for the provided sample, I’ve created case for you in our issue tracking system, its id is CAS-140737-L8Y4B0, so I will update you via the case as soon as I have more information for you.
Thank you for your collaboration