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.

Auto Update Dependent Formulas

Thread ID:

Created:

Updated:

Platform:

Replies:

16671 Jul 21,2004 01:23 PM Jul 21,2004 03:40 PM Windows Forms 8
loading
Tags: GridControl
Akshay Arora
Asked On July 21, 2004 01:23 PM

I''m having trouble figuring out how cells that have formulas update when a cell they depend on change. For instance, I have a formula "=DoSomething( O3, G3, N3, L3 )" If I update G3, then the value shown in this formula should be updated, but it''s not. I tried setting grid.CalculatingSuspended = false, but that didn''t do much. Any thoughts? FYI: I''m using 1.6.1 Thanks, Akshay

Administrator [Syncfusion]
Replied On July 21, 2004 01:59 PM

You should at least upgrade to 1.6.1.8 and 2.0.5.1 woul dbe even better. Are you calling GetValueFromArg to retrieve the values from the cells in your argument list? It is that call that will set up the fact that the current cell dependes upons teh values in teh argument list.

Akshay Arora
Replied On July 21, 2004 02:22 PM

>You should at least upgrade to 1.6.1.8 and 2.0.5.1 woul dbe even better. I forgot to upgrade before our licence expired, though the email that we received about renewing was off by about 4 months as to when our license expires. Either way. >Are you calling GetValueFromArg to retrieve the values from the cells in your argument list? It is that call that will set up the fact that the current cell dependes upons teh values in teh argument list. I am no longer calling that function because it does not return values that are type string. It was only returning numerical type, so I stopped using it.

Administrator [Syncfusion]
Replied On July 21, 2004 02:33 PM

You will still have to call GetValueFromArg to set up the dependency chains.

Akshay Arora
Replied On July 21, 2004 02:35 PM

>You will still have to call GetValueFromArg to set up the dependency chains. Will it set up the dependency chain even when the return value is a string for a given cell? If so, then I can just call it the first time from my custom function and then parse everything manually as stated in the other post

Akshay Arora
Replied On July 21, 2004 02:36 PM

Sorry, meant to link to this post.

Administrator [Syncfusion]
Replied On July 21, 2004 03:18 PM

Yes, I think it should. When you call GetValueFromArg(s) where s equals, say, A1, then the cell being processed should be added to the cells that depend on A1. It should not matter what is in A1. If it is a string, the value returned is 0 in the later versions of our library. So, later when A1 changes, the current cell should be refreshed.

Administrator [Syncfusion]
Replied On July 21, 2004 03:20 PM

Another option is for you to add then dependcies yourself, but you would have to have our source code version to see how to do this. We will try to expose the method that does this in a future release.

Akshay Arora
Replied On July 21, 2004 03:40 PM

>Another option is for you to add then dependcies yourself, but you would have to have our source code version to see how to do this. We will try to expose the method that does this in a future release. I have the source code, but I doubt I will do this, because it will mean that I have to re-deploy the libraries. Here is what I did do instead... private string[] GetValuesForArgs( string args ){ string[] arg = args.Split( '','' ); for( int i = 0; i < arg.Length; i++ ){ try{ string s = this.engine.GetValueFromArg( arg[ i ] ); if( s.Equals( string.Empty ) ){ s = this.gridExpiry[ this.engine.RowIndex( arg[ i ] ), this.engine.ColIndex( arg[ i ] ) ].Text; } arg[ i ] = s; } catch{ arg[ i ] = string.Empty; } } return arg; }

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.

;