This is a migrated thread and some comments may be shown as answers.

Pivot Sort Columns

4 Answers 42 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
gisela
Top achievements
Rank 1
gisela asked on 03 Mar 2014, 03:48 PM
Hi Telerik team,

is it possible ? See attached picture.
The columns are sorted alphabetic (L,M,S), i need the columns in the order S,M,L.

Thanks in advance
Gisela


4 Answers, 1 is accepted

Sort by
0
Kalin
Telerik team
answered on 06 Mar 2014, 09:30 AM
Hi Gisela,

If you just need to sort the columns in descending order, you will have to set the SortOrder property of the desired PropertyGroupDescription to Descending. For more details about the Sorting in the PivotGrid you can check the following article from our online help documentation:
http://www.telerik.com/help/silverlight/radpivotgrid-features-sorting.html

Hope this helps.

Regards,
Kalin
Telerik

DevCraft Q1'14 is here! Join the free online conference to see how this release solves your top-5 .NET challenges. Reserve your seat now!

0
gisela
Top achievements
Rank 1
answered on 06 Mar 2014, 10:35 AM

Hi Kalin,

your proposal works not in all cases.
Example: Sizes = XXS, XS, S, M, L, XL

Both cases of the Sortorder property do not bring the desired result.

I need a Sortorder Property like "None", because i bind the radpivotgrid to the desired ordered list.

Thanks

Gisela

0
Accepted
Kalin
Telerik team
answered on 07 Mar 2014, 10:56 AM
Hello Gisela,

By default RadPivotGrid sorts the data ascending or descending. If you want to control the sorting, you can modify the type of items which you want to sort in order to include an additional property which will be the sorting key afterwards. You will need to implement CompareTo and Equals methods so you can compare the sort keys as required. I have prepared and attached a sample project which demonstrates the exact approach (the class MyProduct has SortKey property which defines the order).

Hope this helps.

Regards,
Kalin
Telerik

DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

0
gisela
Top achievements
Rank 1
answered on 07 Mar 2014, 03:34 PM
Hi Kalin,

it works.

Thank you very much

Gisela
Tags
PivotGrid
Asked by
gisela
Top achievements
Rank 1
Answers by
Kalin
Telerik team
gisela
Top achievements
Rank 1
Share this question
or