I am facing a problem with the formula in the grid. I just have one column with formula which calculates its value by refereing other columns ex: a+b.
The problem that I am facing is when I load the form the formula column calculates the value only for the rows which are visible in the grid, it only calculates value for non-visible rows in the grid when I actually scroll down to them.
how can i resolve this.
I'm not sure I understand. The grid should never be calculating a partial summary. If that's happening, it's a bug. Either that, or your code is not populating all of the cells in the column until later.
But there's really not much information here to go on, so I hesitate to guess what the issue might be.
What kind of summary is this? You say "formula", so I assume you are using UltraCalcmanager. Where are the summaries displayed? If you can see the summaries before scrolling down in the grid, then I assume they must be at the top or maybe in GroupBy Rows.
The grid and CalcManager are optimized to calculate the visible cells in the grid first, but a summary that relies on the cells of a column should not be calculated until after all of the cells it relies on are calculated.
Hi Mike
I am still strugelling with the same problem . I will explain what exactly is happening.
I have a set of columns of which some are very simple calculaiton like a+b etc. when i load the form
what happens is the GRID loads the data and the formula is caculated only for the visible data.
when I scroll the GRID the grid data is made available and then the formula is calculated. I can see
that happening, HOW ?
the thing is have a validate button for doing some data validation , If i do not scroll the GRID to the end and run validation, it fails by throwing null reference exeption on the formula column as there is not value in the rows which are not visible.
I want to understand the GRID and UCM relationship and also understand why the grid i waiting for the user to scroll and then show the data. ?
nichas said: I have a set of columns of which some are very simple calculaiton like a+b etc. when i load the form what happens is the GRID loads the data and the formula is caculated only for the visible data.
Okay, this makes perfect sense. The grid and CalcManager are optimized to calculate the visible cells first whenever possible. This is so the application doesn't hang while all of the calculations that are off-screen complete.
nichas said: when I scroll the GRID the grid data is made available and then the formula is calculated. I can see that happening, HOW ?
I don't understand what you are asking. How what?
nichas said: the thing is have a validate button for doing some data validation , If i do not scroll the GRID to the end and run validation, it fails by throwing null reference exeption on the formula column as there is not value in the rows which are not visible. I want to understand the GRID and UCM relationship and also understand why the grid i waiting for the user to scroll and then show the data. ?
If you don't want the grid to calculate only the visible cells first, you can turn this off using the DeferredCalculationsEnabled property on the CalcManager. Set this to false.
But the CalcManager will still perform all calculations Asynchronously by default. So if you need to force all calculations to be completed before you perform some validation, then you will need to force it. It's been a while, but I think what you would have to do is call:
this.ultraCalcManager1.ReCalc(-1);
If that doesn't work, try setting the calcFrequency to Synchronous or Manual first.
setting DefferedCalculationEnabled to false worked for me.
thanks for the gr8 help.
regards,
Sachin Doshi