Class ExcelAggregateEventArgs
Provides information about an ExcelAggregateTemplateInfo event.
Inheritance
Namespace: Syncfusion.Blazor.Grids
Assembly: Syncfusion.Blazor.dll
Syntax
public class ExcelAggregateEventArgs : Object
Constructors
ExcelAggregateEventArgs()
Declaration
public ExcelAggregateEventArgs()
Properties
AggregateType
Gets the type of aggregate cell being rendered during Excel export, enabling customization based on the specific aggregate type.
Declaration
public AggregateTemplateType AggregateType { get; }
Property Value
Type | Description |
---|---|
AggregateTemplateType | The aggregate template type, as defined in AggregateTemplateType. |
Remarks
This event applies to all aggregate cells, including GroupCaption, GroupFooter, and Footer. This property enables differentiation of these types for customized rendering.
Examples
The following example shows how to use the AggregateType property
to apply custom logic to specific aggregate types in the ExcelAggregateTemplateInfo
event.
...
@code {
public void ExcelAggregateTemplateInfoHandler(Syncfusion.Blazor.Grids.ExcelAggregateEventArgs args)
{
if (args.AggregateType == AggregateTemplateType.Footer)
{
// Custom logic for footer template
}
}
}
Cell
Gets the Syncfusion.ExcelExport.Cell data.
Declaration
public Cell Cell { get; set; }
Property Value
Type | Description |
---|---|
Syncfusion.ExcelExport.Cell | A cell object that represents the cell data. |
Column
Gets the aggregate column of the current cell.
Declaration
public GridAggregateColumn Column { get; }
Property Value
Type | Description |
---|---|
GridAggregateColumn | A GridAggregateColumn object that represents the aggregate column of the current cell. |
GroupKey
Gets the key value of the current grouped record, allowing customization of aggregate values for group caption and group footer template cells when exporting data to Excel.
Declaration
public string GroupKey { get; }
Property Value
Type | Description |
---|---|
System.String | A string that represents the key value of the current grouped record. By default, it is an empty string. |
Remarks
The GroupKey contains a value only when rendering group caption and group footer template cells in Excel. Otherwise, it retains its default value, which is an empty string.
Examples
The following example demonstrates how to use the GroupKey to calculate a custom aggregate in the ExcelAggregateTemplateInfo event.
Style
Gets the cell style of the current aggregate cell.
Declaration
public CellStyle Style { get; set; }
Property Value
Type | Description |
---|---|
Syncfusion.ExcelExport.CellStyle | A Syncfusion.ExcelExport.CellStyle object that represents the style of the current aggregate cell. |
Value
Gets the value of the current aggregate cell.
Declaration
public object Value { get; set; }
Property Value
Type | Description |
---|---|
System.Object | An object that represents the value of the current aggregate cell. |