This example shows how to aggregate data by the field's first value in server mode.
- Form1.cs (VB: Form1.vb)
- FirstValueFunction.cs (VB: FirstValueFunction.vb)
- Program.cs (VB: Program.vb)
In this example, the Grid dashboard item displays the first СontactName value by country.
The following expression gets the first value of the СontactName field:
Calculated Field | Expression |
---|---|
First Contact Name | FirstValue([ContactName]) |
Call the CriteriaOperator.RegisterCustomFunction method to register a custom function in your project (see Program.cs/Program.vb).
- Expression Constants, Operators, and Functions
- Grouping
- ICustomFunctionOperatorBrowsable
- ICustomFunctionOperatorFormattable
- ICustomAggregateFunction
- Dashboard for WinForms - How to Calculate the Numeric Group Interval
- Dashboard for WinForms - How to Calculate Fiscal Functions from Date-Time Data Fields
- Dashboard for WinForms - How to Aggregate Data by String Concatenation
(you will be redirected to DevExpress.com to submit your response)