Pivot Sort Columns

5 posts, 1 answers
  1. gisela
    gisela avatar
    15 posts
    Member since:
    Feb 2006

    Posted 03 Mar 2014 Link to this post

    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


  2. Kalin
    Admin
    Kalin avatar
    1207 posts

    Posted 06 Mar 2014 Link to this post

    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!

  3. DevCraft banner
  4. gisela
    gisela avatar
    15 posts
    Member since:
    Feb 2006

    Posted 06 Mar 2014 in reply to Kalin Link to this post


    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

  5. Answer
    Kalin
    Admin
    Kalin avatar
    1207 posts

    Posted 07 Mar 2014 Link to this post

    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.

  6. gisela
    gisela avatar
    15 posts
    Member since:
    Feb 2006

    Posted 07 Mar 2014 in reply to Kalin Link to this post

    Hi Kalin,

    it works.

    Thank you very much

    Gisela
Back to Top
DevCraft banner