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

Programmatically refreshing the values of a formula cell

How can I force a formula cell to apply a formula to cells in the grid programmatically? The only way I have been able to get a formula cell to refresh is when I modify the contents of one of the cells referenced in the formula. Form_Load Me.GridControl1(1, 1).CellType = "FormulaCell" Me.GridControl1(1, 1).Text = "=sum(b1:c1)" Me.GridControl1(1, 2).Text = 10 Me.GridControl1(1, 3).Text = 10 'Me.GridControl1(1, 1).CellType will be 20 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Me.GridControl1(1, 3).Text = 100 End Sub 'Me.GridControl1(1, 1).CellType will STILL be 20

1 Reply

AD Administrator Syncfusion Team March 18, 2003 08:14 AM

This is a bug. Until we get it corrected, when you programatically set a value, you can force a refresh of dependent cells by calling GridFormulaEngine.Refresh or GridFormulaCellModel.Refresh passing in the cell.

Loader.
Live Chat Icon For mobile
Up arrow icon