Data sources contain detailed information whereas summary reports often require only a general overview of the data stored within the database. With the DXPivotGrid you can group values using predefined intervals or provide your own intervals as needed. Both approaches are extremely simple as demonstrated below.
Use Built-in Mechanisms to Group Axis Values
DXPivotGrid fields expose a property which allows you to merge field values into groups. By changing just a single property you can group date-time values by months, years, etc. Along with date-time group intervals, this property allows you to group values using numeric intervals or alphabetically. When grouping alphabetically, text values are joined into groups by comparing their starting characters.
You can generate a more flexible report by displaying values hierarchically. You can create several fields bound to a DateTime field and specify different group intervals. Thus, end-users will be able to expand and collapse hierarchy nodes so that in a single report they can view the data by years, months or dates. Learn more about this feature here.
Group Values Manually
These built in grouping algorithms will address a wide range of business scenarios, but are by no means the only options available to you. You can easily group axis values using your own criteria. To implement custom group intervals, follow the simple steps below:
- Add an unbound field
Handle an event to supply group values to the unbound field. For instance, if you need to have two groups in a numeric axis - with positive and negative values - you can specify -1 if the target field has a negative value and 1 if not.
Handle an event to substitute group values with user-friendly text. For instance, in the previous example, you can handle this event to replace the 1 and -1 values with the words "Positive" and "Negative" respectively.
The image below shows a sample report with custom grouping.
Because the DXPivotGrid offers you complete control over individual axis, you can deliver a wealth of business value to your customers with only a few lines of source code.
Learn More: Grouping Field Values on Axes
It's Your Choice: All DevExpress Silverlight Controls can be purchased as part of the following Subscriptions:
What's New in 2012
The best keeps on getting better. Our newest Silverlight controls and features include:
Silverlight Tech Library
Explore the power of the DevExpress Silverlight product line at your pace with the following online technical resources: