Blazor PivotGrid - reorder PivotGridColumn?

1 Answer 44 Views
PivotGrid
Mike
Top achievements
Rank 1
Mike asked on 23 Jul 2024, 05:54 PM | edited on 23 Jul 2024, 06:04 PM
Hi,

I have a PivotGridColumn:

<PivotGridColumns>
    <PivotGridColumn Name="@nameof(PivotIpEncounterDetail.Year)"></PivotGridColumn>
</PivotGridColumns>
And I have the data loaded in for the pivot grid in reverse year order (example 2022, 2021, 2020), but when I go to test the grid the columns are reordered in ascending order. By design, I'm not allowed to add extra complexity of the configurator, as our users will only be shown one specific view with an optional aggregation.

What can I leverage to get the columns in the correct order?

Edited to add details:
Using a Local DataProviderType, 2 PivotGridRows, 1 PivotGridMeasure (Sum). 
All the internal guts of the grid itself are fine (numbers are where they should be, etc.),

Just can't seem to reorder the year columns programatically.

1 Answer, 1 is accepted

Sort by
0
Nansi
Telerik team
answered on 26 Jul 2024, 10:24 AM

Hi Mike,

When the field is of a type int, the order is ascending. This is the expected and current ordering behavior. It will be possible to programmatically control the order once the PivotGrid exposes a state management functionality. I have added your vote for this feature request. You can click the Follow button to receive email notifications on status updates.

Currently, the Configurator allows the user to order the columns, but you said that this is not desired in your scenario.

Regards,
Nansi
Progress Telerik

Do you have a stake in the designеr-developer collaboration process? If so, take our survey to share your perspective and become part of this global research. You’ll be among the first to know once the results are out.
-> Start The State of Designer-Developer Collaboration Survey 2024

Tags
PivotGrid
Asked by
Mike
Top achievements
Rank 1
Answers by
Nansi
Telerik team
Share this question
or