Built-in Data Sorting Mechanisms
Among the main benefits of a pivot report is its ability to provide summarized data against matching values instead of viewing each and every record in which the corresponding value appears. The ASPxPivotGrid always sorts values in its axes. It does this to merge matching values into a single value. Thus, you get a single entry for the same trademark, model, date, person or whatever information you are analyzing. By default, the values in the row and column axes are sorted in ascending order. If values are displayed hierachically, the values in the child groups are also sorted. 
You can change the sort order for any field by toggling the field's SortOrder property. End-users can do the same by clicking the desired field header. This feature makes it much easier for end-users to find the desired information. 
Sort Values Manually
By default, field values are sorted in alphabetical order (for text based data) and in order of magnitude (for numeric and date/time data). You are not, however, limited to this sorting logic and can choose one of three additional sorting modes: by values (default), display text, or using a custom sorting algorithm. Use the SortMode property to change the sorting algorithm for a specific field. For instance, in the following image string values in the ID field are sorted using a custom sorting routine to maintain a consistent order for identifiers:

With sorted values, end-users can navigate through reports much more easily and find the entries they are interested in. But often the reverse is required, instead of searching say for how many sales there have been of BMWs, end-users may instead wish to find the brand which has sold the most or least. Instead of searching for how many goals a particular player has scored, they may wish to find the player with the lowest or highest goal count.
Sorting by Summary Values
The ASPxPivotGrid lets you easily solve such reverse data analysis tasks because each field can be sorted by the corresponding total values instead of its own values. All you need to do to make this happen is to specify the field whose summaries should be used for sorting, its value and sort order. The following image shows how you can sort players by the corresponding steal count. 
Using the control's built-in UI elements, end-users can sort field values against any data column or row. 
Top or Bottom Numbers Report
The ASPxPivotGrid provides yet another feature that can greatly enhance your reports. If end-users are not interested in browsing the entire report but only need to investigate the best or worst results, you can suppress any surplus information. To do this, you can specify the number of results that are displayed for each field. Thus, end-users will see the specified number of best results if a field is sorted in descending order. Switching the sort order will result in displaying the same number of worst results.
Again, only a single property's value needs to be changed to enable this feature. And only a single line of code is required to allow end-users to control this. For instance, consider the following value change handler for a spin editor.
|
protected void ASPxSpinEdit1_NumberChanged(object source, ExtendedEventArgs e) { ASPxPivotGrid4.Fields["Name"].TopValueCount = Convert.ToInt32(ASPxSpinEdit1.Number); }
Protected Sub ASPxSpinEdit1_NumberChanged(ByVal source As System.Object, _ ByVal e As ExtendedEventArgs) _ Handles ASPxSpinEdit1.NumberChanged ASPxPivotGrid4.Fields("Name").TopValueCount = _ Convert.ToInt32(ASPxSpinEdit1.Number) End Sub
|
As a result, end-users obtain full control over the data analysis process and can manipulate data layout as they require. The following image shows a more compact report that has been built by limiting the number of top values displayed on-screen. 
In the image above, the TopValueCount property was set to 4 and as a result four field values were displayed in the Name field. In certain instances, you may not know the exact absolute number of field values that are to be displayed, but instead will know the percentage of significant field values. Assume that you need to list the first 20% of field values. To do this, you only need to set the TopValueType property to Percent (by default it's set to Absolute) and TopValueCount to 20.
At times you may need to inform end-users of how the best or worst results displayed on-screen relate to the rest of their data. End-users may need to know how many points have been scored by the rest of the team or how many sales have been completed for other car trademarks, etc. You can display this information by setting the sorted field's TopValueShowOthers property to true. The following image displays an example wherein a pivot grid shows monthly car sales data. Each month displays the 3 best-selling models and information about the sales by the remaining models. 
Back to the Feature List |