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.

Formula Cell

Thread ID:

Created:

Updated:

Platform:

Replies:

47068 Jul 27,2006 08:58 AM Jul 28,2006 08:13 AM Windows Forms 3
loading
Tags: GridControl
Tom Russell
Asked On July 27, 2006 08:58 AM

I have a grid named fg3 and I have set a column to formulas and perform my formula with no issue, however when trying to obtain the end result of my formuals calculation, all I get when accessing the text or cellvalue of the cell is the actual formual I placed in that cell. How do I get the result?

Here''s what I have

Dim style As GridStyleInfo = fg3.ColStyles(5)
style.CellType = "FormulaCell"
fg3(5, 5).Text = "=SLOPE(AL" & startrow & ":AL" & stoprow & ",A" & startrow & ":A" & stoprow & ")"
fg3.CurrentCell.MoveTo(5, 2)
Dim cellText As String = fg3(5, 5).Text


So "CellText" isnt the re4esult but just what I put in that cell for a formula.

Thanks,

Tom

Administrator [Syncfusion]
Replied On July 27, 2006 09:10 AM

Hi Tom,

You can use the FormattedText property to obtain the result in a formula cell. Here is a code snippet

Dim Result As String = fg3(5, 5).FormattedText

Let me know if this helps.
Best Regards,
Haneef

Tom Russell
Replied On July 27, 2006 10:44 AM


That worked. Thanks.

Another issue now is the formula I am using is different than what you would get in Excel using the same data and same ranges. This kinda throws my whole app off.

Any known issues there?

Thanks,

Tom
>Hi Tom,

You can use the FormattedText property to obtain the result in a formula cell. Here is a code snippet

Dim Result As String = fg3(5, 5).FormattedText

Let me know if this helps.
Best Regards,
Haneef

Administrator [Syncfusion]
Replied On July 28, 2006 08:13 AM

Hi Tom,

Thanks for your update. I am afraid that i was not able to reproduce this issue here. If you could send us a sample and some more details on your issue, it will be helpful for us to debug and get it fixed at the earliest.

Thanks for your patience.
Best Regards,
Haneef

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.

;