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

Adding functions to grid (specifically IIF)

The sample (FormulaGrid) states that it is possible to add functions to the included formula engine. How do you do this and can you add an IIF() function?

4 Replies

AD Administrator Syncfusion Team April 16, 2003 01:13 PM UTC

The FormulaGrid sample acttually adds a function to the library (the Min function). The 2 steps needed to do so are noted in the comments of that sample. Here is a link to another thread that has a sample with added formulas. http://www.syncfusion.com/forums/message.asp?MessageID=1995 As far as an IIF formula, right now there is an added complexity as currently there are no binary logical operators supported. So, with the current code library, you could not easily write a function that used a logical expression as the first argument as there is no way to let the engine compute this expression. We will remove this limitation soon. In the meantime, you could, in a straight forward manner, write a function computes sort of a 'arithmetic if' in that the second argument is returned if the first argument if zero or positive, and returns the third argument otherwise.

MS Martin Squicciarini April 22, 2003 12:46 PM UTC

Clay, I found the Min example and was able to crete an If() function (it's still a work in progress but it getting there). The function I developed follows what you suggested. I have a few more features to add but I now have another issue. Some of the equations that our client uses in Excel are of the form =$A:$A +$B:$B to add the values in a single row. Will this be support in the near future. Finally, when will these features be available? Thanks for all you help.

AD Administrator Syncfusion Team April 22, 2003 05:38 PM UTC

Currently, all our formulas are absolute references (like the Excel $ reference notation). We will be adding support for relative references. It is a high priority item, and should be finished soon (weeks not months), but I don't know when it will actually become available.

MS Martin Squicciarini April 23, 2003 08:31 AM UTC

I would be interested in obtaining that feature asap even to the point of beta testing it. Our client uses the $A:$A referencing to refer to the current row. Thanks.

Live Chat Icon For mobile
Up arrow icon