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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

problem with cell formulas

Thread ID:





94938 Jun 11,2010 06:38 PM UTC Jun 30,2010 04:13 AM UTC WinForms 9
Tags: GridControl
Administrator [Syncfusion]
Asked On June 11, 2010 06:38 PM UTC

In the attached example, defining a named range where the value is specified to be an equation like "=sum(d5:f5)" doesn't seem to work. When the defined named range is referred to elsewhere, it seems to return 0. However, if the cell if refered to directly (as opposed to refering to it by the defined name), it appears to return the correct value. Is there a way to use the defined name instead of the explicit cell reference?


Nirmal Raja [Syncfusion]
Replied On June 14, 2010 05:43 AM UTC

Hi Jan,

Thank you for your interest in Syncfusion products.

The named range will add the value what ever the second parameter provides. As analyzed in the example, the text of the cell is moved as the value for the named range collection, the text will contains only the formula and when it is specified in the second grid, the formula will be applied to the grid and the d5 and f5 values will be retrieved from the current grid which is empty. This is the reason for the value returned as zero. If you need to add the value to the named range instead of the formula, then try to add through the FormattedText property which returns the calculated value instead of formula.

Please refer the modified sample attached below:

Let me know if you have any queries.


Administrator [Syncfusion]
Replied On June 14, 2010 11:53 AM UTC

Why do I seem to find it necessary to use something like "=+foobar" instead of simply "=foobar" when referencing named ranges which are defined as combinations of other named ranges? (see attached example)

WindowsFormsApplication1 - Copy_c2f44f08.zip

Jisha Joy [Syncfusion]
Replied On June 16, 2010 01:39 PM UTC

Hi Jan,

You could refer the following sample from the sample browser illustrates the use of multiple sheet references and named ranges along with the GridFormulaEngine.

C:\Syncfusion\[Version]\Windows\Grid.Windows\Samples\2.0\Formula Support\Named Range For Formula Demo\cs

Please have a look at it for the proper usage of named ranges and let me know if this helps.


Administrator [Syncfusion]
Replied On June 16, 2010 07:23 PM UTC

I took a look at the recommended sample but did not find anything that explained the problem. If you could provide a bit more information as to why it is happening, that would help.


Jisha Joy [Syncfusion]
Replied On June 23, 2010 11:45 AM UTC

Hi Jan,

I have tested the issue in the following sample. But I am afraid I was not able to see the issue. We could refer the named ranges with "=" sign without any problem. See the sample attached.



Administrator [Syncfusion]
Replied On June 25, 2010 03:50 PM UTC

Have you tried modifying the sample that I provided to see if you get the same results?

Jisha Joy [Syncfusion]
Replied On June 29, 2010 07:09 AM UTC

Hi Jan,

Thank you for your update.

You need to use "=foo + bar" instead of "foo + bar" while setting value to the named ranges when it is defined as combinations of other named ranges

grid1[4, 2].Text = "=foo + bar";

Modified sample attached.

Please let me know if this helps.



Administrator [Syncfusion]
Replied On June 29, 2010 01:23 PM UTC

Thank you. I see what I was doing wrong.

Jisha Joy [Syncfusion]
Replied On June 30, 2010 04:13 AM UTC

Hi Jan,

Thank you for your update.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon