Oh yeah to make it even stranger, when I highlight all the rows by hand the code works, when I use the right click highlight all is when it fails
I'm using Version 6.1 and upgrading is not an option at this current point in time.
{
}
else
this.ultraGrid1.EndUpdate();
I don't see anything wrong with this code, but it's very hard to tell anything from a code snippet.
The CalcManager calculates asynchronously by default. So the values don't get updated in the grid cells instantly when you add a formula, it takes time. You can force all calculations to be completed synchronously by calling the ReCalc method on the CalcManager - but this may lock up the UI while the calculations are performed.
Here is my ultraCalcManager code.
this.createdColumn.Layout.Grid.CalcManager = new UltraCalcManager( );
DialogResult result = dlg.ShowDialog( this );
this.ultraTextEditorFormula.Text = dlg.Formula;
this.createdColumn.Formula = this.ultraTextEditorFormula.Text;
When I look at the methods available for:
this.createdColumn.Layout.Grid.CalcManager
ReCalc is not an available method, i see EnsureCalculated
thank you, Jamie
worked great, thank you Mike
TheHighHeat said:any thoughts on how to fix that?
Yes. :)
I think what you will need to do is set DeferredCalculationsEnabled to false on the CalcManager before you call ReCalc. And then you should probably re-set it back to true.
By default, the grid calculates the visible rows first for efficiency, but in this case, you want to calculate everything.
I'm still getting the same error after calling ReCalc, it seems as though only the rows that can currently be seen on the screen are being calculated, any thoughts on how to fix that? Thank you, Jamie
TheHighHeat said:When I look at the methods available for: this.createdColumn.Layout.Grid.CalcManager ReCalc is not an available method, i see EnsureCalculated
That's because the CalcManager property of the grid doesn't return an UltraCalcManager component. It returns an IUltraCalcManager. So you either need to use the member variable for the CalcManager on your form, or else cast the one from the grid to the proper type.
I tried to look around for something that might be able to help me, but I'm still stuck, any ideas? Thank you, Jamie