The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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
ADAdministrator Syncfusion Team March 18, 2003 01:14 PM UTC
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.