Hi
i am using ultra win grid 8.0 in my VB.NET windows application. I have a column which displays the integer values. I am populating the grid on click of a button.
I want to display the sum of all the values in a column in the last row of that column. The sum should be calculated dynamically whenever the values in the Grid changes .
Is there any property or Formula to calculate the sum of all the values in a column ?
Thanks in Advance.
Ashok
It works fine. Thank you very much
Handle the SummaryValueChanged event of the grid. This event is fired when a summary value for a summary changes. It is also fired when the summary is calculated for the first time. You can set appearence and formatting of the SummaryValue object in this event. For example
If e.SummaryValue.Key = "MySumSummary" Then
e.SummaryValue.SummarySettings.DisplayFormat = "{0}"
End If
if you want to do any formatting of the actual sum you can use the .NET format strings. i.e.
e.SummaryValue.SummarySettings.DisplayFormat = "{0:n2}"
Thanks a lot...... It s working fine..
It is displaying the sum as Sum = 12345
i want to remove the "Sum = " and want only the value to be displayed. How to remove "Sum = "
Thanks
Yes, add a Summary to the Summaries collection of the appropriate band. For example,
ultraGrid1.DisplayLayout.Bankds(0).Summaries.Add(SummaryType.Sum, col, SummaryPosition.Blah, Nothing)
You have control as to where the summaries are displayed and how they are formatted. By default a sum will display as "Sum = 12345".