sort on total row
Good morning,
i would like if there is a way to sort the results on the total rows .
I'm talking about the values inside the red square in the image below.
In the sort option that i can find, there is the way to sort for the sub total but what i need , in the image above, is to see car records before bike records if i want to sort the totals from the smallest to the biggest.
Is it possibble?
Thank You inadvance
- Define the custom ReverseOrderComparer.
- To apply this comparer to PivotItem, an instance for the ReverseOrderComparer is created and assigned it to the Comparer property of the Product PivotItem.
- Define the pivot grid control and raise the loaded event for pivot grid.
- Inside the PivotGrid_Loaded() event, raise the loaded event for the grouping bar.
- Inside the GroupingBar_Loaded() event, set the value of the AllowMultiFunctionalSortFilter property to “true”.
- Click the Filter icon for the Product and select More Sort Options.
- Click Ascending (A to Z) by or Descending (A to Z) by, and then choose the field you want to sort(Quantity/Amount).
|
# MainWindow.xaml.cs
public MainWindow()
{
InitializeComponent();
this.pivotGrid1.Loaded += PivotGrid1_Loaded;
}
private void PivotGrid1_Loaded(object sender, RoutedEventArgs e)
{
pivotGrid1.GroupingBar.Loaded += GroupingBar_Loaded;
}
private void GroupingBar_Loaded(object sender, RoutedEventArgs e)
{
pivotGrid1.GroupingBar.AllowMultiFunctionalSortFilter = true;
} |
Good morning,
sorry for late. This is exactly what i was seraching for.
Thank You very much
Best regards
Good evening,
i'm sorry but now there is a new problem.
The sorting works as i requested: the problem is that once i sorted on a second column, the vertical scroll bar disappear and i can't scroll nomore.
I think it's a sort of visualization bug.
i've attached a zipped gif to show you the problem
Can you help me, please?
Attachment: vertical_scroll_bar_1f1b848d.rar
|
Query |
Response |
|
This is exactly what i was seraching for. |
We are glad to know that the provided solution resolved your reported scenario at your end.
|
|
The sorting works as i requested: the problem is that once i sorted on a second column, the vertical scroll bar disappear and i can't scroll nomore. |
We were unable to reproduce the reported issue "Vertical scrollbar did not display after filtering the pivot rows item" on our end.
By default, horizontal and vertical scrollbars should be displayed based on the Pivot grid column and row count values. If the row count value was less than the actual pivot grid height, the vertical scrollbar was not displayed. If the row count value is more than pivot grid height, the vertical scrollbar will be enabled automatically.
Please refer to the attached videos from the following link:
Could you please check the issue in aforementioned sample and let me know whether or not the reported issue has been resolved? If you are still experiencing the same problem, could you please share your working sample or modify the attached sample to reproduce the reported issue we can provide a solution as soon as possible?
|
Good moring,
i tryed Your sample and the main difference i can see is that Your Itemssource is a viewmodel class while in my caseis a table from a dataset. Anyway i removed the following option:
ResizePivotGridToFit="True"
and now it works. The vertical scrollbar remains
Thank You
Best regards
- 6 Replies
- 2 Participants
- Marked answer
-
MD marco del frate
- Dec 14, 2021 03:18 PM UTC
- Jan 26, 2022 10:58 AM UTC