This example shows how to aggregate your data by string concatenation.
In this example, the Grid dashboard item displays СontactName values concatenated by country.
The following expressions aggregates data by string concatenation for СontactName values:
| Calculated Field | Expression |
|---|---|
| Contact names by countries | StringConcat([ContactName]) |
Call the CriteriaOperator.RegisterCustomFunction method to register a custom function in your project. The following code snippet shows how to register the numeric group interval's function:
using System; using System.Windows.Forms using DevExpress.Data.Filtering; namespace Dashboard_StringConcatAggregate { static class Program { /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main() { // ... CriteriaOperator.RegisterCustomFunction(new StringConcatFunction()); Application.Run(new Form1()); } } }Imports System.Windows.Forms using DevExpress.Data.Filtering Namespace Dashboard_StringConcatAggregate Friend Module Program ''' <summary> ''' The main entry point for the application. ''' </summary> <STAThread> Sub Main() ' ... CriteriaOperator.RegisterCustomFunction(New StringConcatFunction()) Application.Run(New Form1()) End Sub End Module End Namespace