Hello Team,
We want to calculate the values at run-time manually. The formulas are not fixed, the users can create the formula of their choice. Our data is as follows
Unit Value Formula
LF 10
SF 20
VL 30
R1 SQRT (LF * SF)
R2 SUM (VL , LF , SF)
The 'R1' and 'R2' are the summary or Grand Total row, the result would be displayed in the value coulmn on the basis of the Formula entered in their respective rows.
How to implement the calcManager manually at runtime for these Rows ?
We would also be using all the built-in functions provided by infragistics Formula Builder (for eg. cos,abs, average ..etc).
Looking forward to your reply.
Hi,
There's no way to apply a formula to an individual cell in the WinGrid. You can apply a formula to a Colmun or a Summary.
It seems to me that you should use a Summary here, rather than a column. Why show a whole column of empty Cells just to show two values in rows which would also have empty cells?
So what you would do is use the InitializeLayout event of the grid and use the band.Summaries.Add method to add your two summaries with formulas.
Thank you for the reply.
As per our example in the R1 and R2 rows, the value column will have the result on the basis of the formula provided againt these respective rows. As we are allowing the user to make the formula, the number of rows in which the user can select the formula is not fixed, and also the formula will contain the combinations of any rows.
Is there any other way we can do it ? We cannot apply summary as it is applied to the column and not the cell and also the number of rows in which the user would have defined the formula is not fixed.
Looking forward for your reply.