Hello.
I have worked with the component CalcManager. I have a WinGrid with two Bands. I want that the sum of values of cells of the second band insert into a cell of the first band. I tried:
ultraGrid.CalcManager = ultraCalcManager1;
ultraGrid.DisplayLayout.Bands[0].Columns.Add("SumBeginRate", "BeginRate").Formula = "SUM([//ultraGrid/Band 1/BeginRate])";.
I heve an error #REF!.
Help me, please.
I assume you want the sum of only the rows under a particular parent row, not the total of all rows in Band 1.
Try this:
"SUM([Band 1/BeginRate(*)])"
You are right. Yes, I want the sum of only the rows under a particular parent row. But your example does not work for me. If it to use for Band 0 those all works. I do not understand why does not work for Band 1. In ultraGrid has specified as a DataSource DataSet. Names of tables has specified:
ds.Tables [0].TableName = "Band 0";
ds.Tables [1].TableName = "Band 1";
Not only the sum is not considered, no calculations with Band 1 no pass that they could be brought in a cell of Band 0.
Sorry for my english. I want this, please look at this image.
I gave you the code to do this above. What part of this are you having trouble with?
I write ths code:
ultraGrid.DisplayLayout.Bands[0].Columns.Add("SumBeginRate", "Начальная оценка").Formula = "SUM([Band 1/BeginRate(*)])";
I have - #REF.
Thank you for your help.
My guess is that you are not using the correct names, then. Make sure that the key of the band is actually "Band 1" and that the key of the column is "BeginRate".
If that does not help, then perhaps you need to update to the latest service release. It's possible that this was a bug in an old version of the control.
If that still doesn't help, I recommend that you create a small sample project demonstrating the error and either post it here or Submit an incident to Infragistics Developer Support so we can take a look and see what's wrong.
Hey Mike how would this look in VB. Sorry my C-Fu is weak :-/
Hi.,
Aside from the semi-colons, the code is almost exactly the same. Oh, and change the square brackets to parens for the indexers.