We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Formula not refreshing

I have a gridControl with formula cells but they are not recalculating when I change values on the cells that I want and are presente in the formula. Can you help me?

8 Replies

Administrator September 6, 2004 03:18 PM UTC

What version are you using? Do you see the problem in 2.1.0.9? If you are using 2.0.5.1, you might try setting engine.UsesVirtualDataSource = true to see if that makes things update?

JO Jorge September 7, 2004 12:26 PM UTC

I''m using the latest build that I downloaded from your website

Administrator September 7, 2004 01:21 PM UTC

At the end of your FormLoad (after the grid has been initialized, you might add this code to see if it makes a difference. GridFormulaEngine engine = ((GridFormulaCellModel)this.gridCalculations.CellModels["FormulaCell"]).Engine; engine.RecalculateRange(GridRangeInfo.Table()); If not, can you post a sample project that shows the problem, or can you tell us how to see the problem in one of the samples that we ship?

JO Jorge September 7, 2004 02:30 PM UTC

I guess I found what the problem is... I currently have two grids (let''s call them grid1 and grid2). When I click and element of grid1 it automatically passes the value to grid2. I have the formula in grid2 and it is not refreshing when the value is passed from grid1. All other formulas are working so it must be from this. I guess the value passed from one grid to another is not being validated in grid2. I''m passing it like this from one grid to another: Me.grid2.Item(0, 3).CellValue = Me.grid1.SelectedItems(0).Text

Administrator September 7, 2004 02:43 PM UTC

I didn''t discovered what is wrong. Can you help me?

Administrator September 7, 2004 03:05 PM UTC

After setting Me.grid2.Item(0, 3).CellValue, try calling engine.RecalculateRange(GridRangeInfo.Cell(0, 3)) to see if that triggers the refresh. Here engine is a reference to the GridFormulaEngine object. Another thing you can try is code like this after setting Me.grid2.Item(0, 3).CellValue. Me.grid2.Item(0, 3).FormulaTag = Nothing Dim s as string = Me.grid2.Item(0, 3).FormattedText This tries to force the

Administrator September 7, 2004 03:18 PM UTC

I did a recalculateRange and it worked. Nevertheless it is not very fast. As a satisfied user of your grid it''s my duty to recommend syncfusion to review this issue as it is very important. Other grids do this with no trouble. Nevertheless this grid is very good ;)

Administrator September 7, 2004 03:35 PM UTC

Can you post a sample so we can see the problem and try to do something about it?
Loader.
Live Chat Icon For mobile
Up arrow icon