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

Setting FormulaCell formula

How do i apply the formulas listed in GridFormulaEngine to my FormulaCells? Do i have to place some text there, or do i have to set its FormulaTag property, or do i have to bind it to a new instance of GridFormulaEngine? And, most important for me - HOW do I do this :) Thanks ahead!

4 Replies

AD Administrator Syncfusion Team August 6, 2003 09:45 AM UTC

If you want cell 1,4 to be the sum of the cells (A1:C1), then you would set the Text property of cell 1,4 to be the formula. //make 1,4 a formula cell this.grid[1,4].CellType = "FormulaCell"; //set the formula this.grid[1,4].Text = "=SUM(A1:A3)"; So, in general, to programatically set a formula, you set the cell's style.Text property to be exactly what you would type into the cell.

NP Nick Pasko August 7, 2003 12:42 AM UTC

Yes, thanks! :) Ummm.. I hope this won't bore you to the death, but.. regardless of myself assuming that I need to use "SUM", "AVG" etc. keywords to describe the fuction, probably keywords containing the last three characters form the GridFormulaEngine methods, I would still like to know EXACTLY which keywords do I need there. You gave me a hint about GridFormulaEngine's methods, could you please also give me a hint about these keywords? PS I hope that sentence is not TOO complicated, though i realize it IS, a little, maybe.. ;)

AD Administrator Syncfusion Team August 7, 2003 05:38 AM UTC

If you look at the Syncfusion\Essential Suite\Grid\Samples\Quick Start\FormulaGrid sample, it lists all the current formulas that are part of the formula library shipped with the product. Also, in the Suite Class Reference, if you look at the methods in the GridFormulaEngine class, you will see a series of methods named ComputeXXXXXX. The XXXXXX are the keywords for the formula library entries.

NP Nick Pasko August 13, 2003 06:06 AM UTC

Thank you very much, indeed!

Live Chat Icon For mobile
Up arrow icon