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
close icon

Programmatically setting Formulas

Hi,
How can I programmatically set formulas to a cell. I want to put a formula which will refer another cell during initialization of the grid.

thanks
thanvir

1 Reply

AD Administrator Syncfusion Team August 8, 2007 07:31 PM UTC

In a GridControl, you can use code like this to set a formula into a cell:

//make cell C4 be the sum of A1 and B1.
grid[4,3].CellType = "FormulaCell";
grid[4, 3].Text = "= A1 + B1";

Loader.
Live Chat Icon For mobile
Up arrow icon