Intersoft WebGrid Documentation
AggregateFunctions Enumeration
See Also  Send Feedback
ISNet.WebUI.WebGrid Namespace : AggregateFunctions Enumeration






Value representing aggregate functions for the columns in the WebGrid control.

Syntax

Visual Basic (Declaration) 
Public Enum AggregateFunctions 
   Inherits System.Enum
Visual Basic (Usage)Copy Code
Dim instance As AggregateFunctions
C# 
public enum AggregateFunctions : System.Enum 
Delphi 
public enum AggregateFunctions = class(System.Enum)
JScript 
public enum AggregateFunctions extends System.Enum
Managed Extensions for C++ 
__value public enum AggregateFunctions : public System.Enum 
C++/CLI 
public enum class AggregateFunctions : public System.Enum 

Members

MemberDescription
AvgTotal row cells display the average of the values.
CountTotal row cells display the count of records in a group or table.
CustomCustom aggregate function handled on CustomAggregate event.
MaxTotal row cells display the count of records in a group or table.
MinTotal row cells display the minimum value.
NoneNo function is applied. The total row displays an empty cell under the column.
SumTotal row cells display the sum of the values.

Example

private void WebGrid1_CustomAggregate(object sender,
ISNet.WebUI.WebGrid.CustomAggregateArgs e)
{
    if (e.Column.DataMember == "Status") 
    {
        WebGridRowCollection rows = e.Rows;
        int count = 0;
        for (int i=0; i < rows.Count; i++) 
        {
            WebGridCell cell = rows[i].Cells[e.Column.Position];
            if (cell.Value.ToString() == "Active")
            {
                count++;
            }
        }
        e.AggregateResult = count;
    }
}

Remarks

The aggregation functions such as Count, Sum, Average, Min and Max are generally applicable to most application's requirements. However, they do not allow you to perform your own calculation on the grouped rows or footer's totaling.

Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         ISNet.WebUI.WebGrid.AggregateFunctions

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

©2012 Intersoft Solutions Corp. All Rights Reserved.