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
AD
Administrator
Syncfusion Team
July 21, 2004 05:59 PM UTC
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.
AA
Akshay Arora
July 21, 2004 06:22 PM UTC
>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.
AD
Administrator
Syncfusion Team
July 21, 2004 06:33 PM UTC
You will still have to call GetValueFromArg to set up the dependency chains.
AA
Akshay Arora
July 21, 2004 06:35 PM UTC
>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
AA
Akshay Arora
July 21, 2004 06:36 PM UTC
Sorry, meant to link to
this post.
AD
Administrator
Syncfusion Team
July 21, 2004 07:18 PM UTC
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.
AD
Administrator
Syncfusion Team
July 21, 2004 07:20 PM UTC
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.
AA
Akshay Arora
July 21, 2004 07:40 PM UTC
>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;
}