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

Enter a formula in a FormulaCell, it will prompts need some parameters.

First I Change Region and Language settings to French(Canada),  Run my program and Enter a formula ("IF((A1>A2),A1,A2)") in a FormulaCell, Click the Enter Button it show a messageBox "requires 3 arguments". Can you tell me how to get the correct results?

Regards,
Mark Li

3 Replies

KB Kanimozhi Bharathi Syncfusion Team April 13, 2015 12:12 PM UTC

HiMark Li,

Thank you for contacting Syncfusion support.

We have analyzed your query and this issue occurs because the argument separator will be varied based on your Language and Region settings. So, you can overcome this issue by setting ParseArgumentSeparator of GridFormulaEngine as “,” like the following code snippet

Code snippet:



GridFormulaEngine.ParseArgumentSeparator = ',';

Please let us know if you have any queries

Thanks

Kanimozhi B



ML Mark Li April 14, 2015 03:38 AM UTC

Hi kanima,
Your reply to solve my problem, thanks! 
There was another issue, if I enter a Formula like "=IF ((A1-A2) <0,0,A1)", 
It will recognize the comma int the formula as a decimal point, then it show a message that  "number contains 2decimal points". I tried to set"GridFormulaEngine.ParseDecimalSeparator = '.'", 
but it does not work.Can you give me some suggestions to solve the problem?


KB Kanimozhi Bharathi Syncfusion Team April 14, 2015 12:54 PM UTC

HiMark Li,

We have analyzed your query and in French region language settings “,” is treated as decimal separator and “;” is treated as argument separator. So, you can overcome this issue by setting ParseDecimalSeparator of GridFormulaEngine as “.” and ParseArgumentSeparator of GridFormulaEngine as “,” like the following code snippet

Code snippet:

GridFormulaEngine.ParseArgumentSeparator = ',';

GridFormulaEngine.ParseDecimalSeparator = '.';

We have also prepared a sample for your clarification. Please find the sample link below.

Sample link: https://www.syncfusion.com/downloads/support/forum/118802/WpfApplication9_(3)476371596.zip

If the issue still persists at your side, please revert us by modifying the sample based on your application along with the replication procedure? This would be helpful for us to serve you.

Please let us know if you have any queries

Thanks

Kanimozhi B


Loader.
Live Chat Icon For mobile
Up arrow icon