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.
Unfortunately, activation email could not send to your email. Please try again.

problem with cell formulas

Thread ID:

Created:

Updated:

Platform:

Replies:

94938 Jun 11,2010 02:38 PM Jun 30,2010 12:13 AM Windows Forms 9
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On June 11, 2010 02:38 PM

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 01:43 AM

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 07:53 AM

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 09:39 AM

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 03:23 PM

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 07:45 AM

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 11:50 AM

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 03:09 AM

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 09:23 AM

Thank you. I see what I was doing wrong.

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

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.

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.

;