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

Allowing formulas to start with + or - as well as =

Hello,
In Excel if the cell contents start with - or + the cell contents will be treated as a formula, in addition to cells starting with =.

I've tried setting the formulaChar to '\0' in the GridFormulaCellModel constructor to treat every cell as a formula as an attempt to get something like this to work, it doesn't. A & symbol in a normal string crashed the program outright.

Looking at the source the use of formulaChar looks widely dispersed meaning adding this sort of functionality would not be trivial.

Is there any way to hack together what I am trying to do here?

Thanks,
Ben

1 Reply

AD Administrator Syncfusion Team July 16, 2007 05:32 PM UTC

We will have to modify our source to enable this functionality. We will setup a mechanism for you to derive GridFormulaEngine and allow you to override GridFormulaEngine.Parse. At that point, you could check the incoming potential formulastring, and if it is something that does not begin with = that you want to recognize as a formula, and if so, you can pre-pend an "=" to the string before calling the baseclass.

If you submit a Direct Trac support incident, we can notify you of when there is a daily build with this support in it.

Loader.
Live Chat Icon For mobile
Up arrow icon