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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

problem with cell formulas

Thread ID:

Created:

Updated:

Platform:

Replies:

94938 Jun 11,2010 06:38 PM UTC Jun 30,2010 04:13 AM UTC WinForms 9
loading
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?




WindowsFormsApplication1_e1103eb1.zip

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:
http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=WindowsFormsApplication1-1186291608.zip

Let me know if you have any queries.

Regards,
Nirmal

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.

Regards,
Jisha

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.

v/r
Jan

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.

Regards,
Jisha



NameSample_2158438c.zip

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.

Regards,
Jisha



WindowsFormsApplication1_a5992cf5.zip

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.

Thanks,
Jisha

CONFIRMATION

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.

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

;