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.
Sorry for my english. I want this, please look at this image.
Hi,
I'm afraid I do not understand what you mean. The formula I have you here totals up the child rows of a particular parent row. This formula will not work for any rows in Band 1, because the rows in Band 1 don't have any child rows.
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.
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(*)])"