Class that allow users to perform custom calculation on Rows collection.
Object Model
Syntax
Visual Basic (Declaration) | |
---|
Public Class CustomAggregateArgs
Inherits BaseEventArgs |
Managed Extensions for C++ | |
---|
public __gc class CustomAggregateArgs : public BaseEventArgs |
C++/CLI | |
---|
public ref class CustomAggregateArgs : public BaseEventArgs |
Example
The following sample codes show you how to implement aggregate calculation by handling the CustomAggregate event.
C# | Copy Code |
---|
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
Inheritance Hierarchy
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