Hi! I need to display summary value for a column in textbox or label, not in WinGrid. How can I do this.
And another question is: How can I use summary value in a formula?
When you add your summary, you must specify a Key. There are a bunch of overloads to the Summaries.Add method that let you specify a key. Or you can just get the SummarySettings that is returned from the Add method and then set the Key.
Once your summary has a key, you can use that key in a formula in the same way you would reference a column.
I would like to be able to reference a summary value as part of the formula. For example, I want to calculate the percentage of a cell value compared to the sum of all cells in the column. I know that in this example, I can just use a formula like "[mycolumn] / sum( [mycolumn(*)] ). But I also have more complicated cases where the summary is a custom summary calculator where I can't use a workaround like this.
If you're simply looking to reference the value of a summary for your own validation or population purposes:
YourUltraGrid.Rows.SummaryValues["SummaryName"].Value
If you have summaries defined in the grid, they will export with the ExcelExporter. It doesn't matter whether the summaries use UltraCalcManager or if they are just regular summaries.
Of course, if your summary is in a textbox or a label outside the grid, then clearly this will not be exported, since it's not a part of the grid.
Well...I don't think so, Sal... I hope that I'm wrong...but I didn't find the solution for the same problem I had.. =(