Hi,
I have a grid that contains a formula column
the values of this column are to be saved in the database.
My problem is that only the rows in view are being updated and inserted. all other rows wont be saved unless i go into each one before saving.
i tried to update data of the grid and refresh but still it's not working
is there a way of applying the formula on all rows before saving?
thx
the solution was to set the calcfrequency to synchronous when applying the formula
.uCalcManager.CalcFrequency = Infragistics.Win.UltraWinCalcManager.
CalcFrequency.Synchronous;
, then set it to manual (in the finally)
Also, try setting DeferredCalculationsEnabled on the CalcManager to false. This will tell it not to optimize by calculating the visible rows in the grid first.
This may cause some performance problems in your application if you have a large number of rows in the grid, of course. But that's the trade-off, if you want everything to be calculated all the time.
My guess here is that, for efficiency, the grid isn't forcing the calc manager to calculate the value for every row if they aren't visible. I'm not sure what you mean by 'saving' unless you just mean trying to propogate the values back to your database, but you might be able to try setting the CalcFrequency on the CalcManager to Synchronous, then call the ReCalc method; I'm not sure that this will work since the grid still might not request the new values until it needs to be painted, but this may be worth a shot. If this doesn't work, I can't think of any other approach except asking for the cell values of each row (you might want to use GetCellValue instead of cell.Value so that you don't force any cells to be created that don't already exist).
-Matt