I have a grid where most of the cells are formulas.
The grid is populated using a table adapter.
When i want to update the database i run the update method of the table adapter.
It takes a long time to update the database. If i do not have any formulas it updates the database straight away. Why does it take so long with formulas?
It's hard to say without knowing more about your application.
One guess is that your grid has a lot of rows. The CalcManager is optimized so that it calculates the visible cells in the grid first. So if there are a lot of cells outside the view, they will not be calculated until they are brought into view or someone asks for the Value of a cell. When you save your data, the DataAdapter probably asks for the value of every cell, so all of the cells have to get calculated at that point and that might cause a delay.
I suspended the Calc manager before running the update on the table adapter and the i resume after updating the table adapter.
Me.CalcManagerxxx.SuspendCalc()
Me.Gridxxx.UpdateData()
Me.TableAdapterxxx.Update(Me.DataSet.tablexx)
Me.CalcManagerxxx.ResumeCalc()