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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Do not recalculate the formula in GridControl

Thread ID:





129020 Feb 22,2017 06:45 AM UTC Feb 23,2017 02:21 PM UTC WinForms 1
Tags: GridControl
Asked On February 22, 2017 06:45 AM UTC

Do not recalculate formulav table. Suppose there are 6 columns and rows.
6 = column formula, which puts the value of 2 and 4.
The default values in the cells are. But when I change a figure, say a cell line 2, the 6 cell and is the sum of the default value

Mohanraj Gunasekaran [Syncfusion]
Replied On February 23, 2017 02:21 PM UTC

Hi Slava, 

Thanks for using Syncfusion products. 
We have tried to reproduce your scenario using below attached sample. But we are unable to reproduce your scenario at our end. By default, if you have used the cell reference in formula cell for calculations, the changes will be automatically reflected while changing that reference cell value. Please provide your code part to reproduce your scenario. If we have missed anything in our sample, please modify the sample to reproduce your scenario. It will be helpful to provide the solution at the earliest. 
Sample link: GridControl 
Video link: VideoDemo 

If you want to force a range of cells to recalculate or refresh the formula cell, you can use the ReCalculateRange or RefreshRange method in CurrentCellEditingComplete event. Please refer to the below code example, 
Code example 
GridFormulaCellModel model = (GridFormulaCellModel)this.gridControl1.CellModels["FormulaCell"]; 
GridFormulaEngine engine = model.Engine; 
this.gridControl1.CurrentCellEditingComplete += gridControl1_CurrentCellEditingComplete; 

void gridControl1_CurrentCellEditingComplete(object sender, EventArgs e) 
    GridCurrentCell currentCell = this.gridControl1.CurrentCell; 
    GridRangeInfo range = GridRangeInfo.Row(currentCell.RowIndex); 
    engine.RecalculateRange(range, true); 
    //You can use below method instead of RecalculateRange method 

Mohanraj G. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon