I created columns in code, 3 to Row Area, rest in column area, and all those in row area are grouped by name, and I don't want any of grouping/sorting, because I sorted and grouped it as I want in stored procedure.
Any idea how to disable automatic grouping/sorting?
Thanks
There is no way to prevent the data from being sorted. Basically, the ASPxPivotGrid is intended to perform cross calculation. To properly calculate results it is necessary to group data by fields that are used to calculate results. To group data it is necessary to sort rows correspondingly. For example, suppose that the underlying list contains the following data:
If it is necessary to construct rows based upon captions, then pivot must sort them, because otherwise there is an ambiguous on which caption should be displayed first of all.
As you can see from the above sample, it is impossible to completely disable sorting. However, you can apply your own custom sorting algorithm and using the CustomSorting event in which you should adjust the e.Result parameter based upon the current row position:
Please also review the following article: Data Sorting
Ref: Can I disable sort?
In this case, it is necessary to sort data manually by handling the ASPxPivotGrid.CustomFieldSort event. Do your calculation of sorting and grouping at this event.Below, I have posted a code snippet, demonstrating how to disable sorting:
Reference:
Disable sorting feature by row/column
How to disable sorting and filtering features
SortOrder changed event handler
Regarding Grid Default Alphabetic Sorting
PivotGridCommands.ClearSorting Property
check the AspxPivotGrid Sorting section for help in your calculations.
ASPxPivotGrid's
PivotGridOptionsCustomization.AllowSort
option.The order in which field values are sorted is specified by a field's
PivotGridFieldBase.SortOrder
property.