Custom sorting on pivotgrid on multiple columns

5 posts, 1 answers
  1. Mohan
    Mohan avatar
    9 posts
    Member since:
    Aug 2018

    Posted 01 May Link to this post

    I have an issue while doing custom sorting( PivotGridSortOrder.None) on pivot grid using multiple columns. 

    Issue: Want to use custom sorting for pivotgrid control.
    * I have set both the row field (Country field) and column field (StateCode) to PivotGridSortOrder.None so that it does not use ascending or descending sorting instead it will use sorting as per data set provided.
    * For country field(Row field) I have following values : Japan, Argentina, Zimbabwe and India, I want pivot grid to display them in same order too and it is working fine.
    * For StateCode field (column field), I have following values: Mno, Abc, Zmp and Ctp and I want pivot grid to display them in this order only. But it is not.

    * Dataset being returned by SP is attached. refer screenshot.

    * Data being displayed on pivot is attached, refer screenshot.

    Let me know how to fix it.

  2. Eyup
    Admin
    Eyup avatar
    3785 posts

    Posted 02 May Link to this post

    Hi Mohan,

    Thanks for the provided explanation and images.

    It seems that in the database you have Zmp, Mno, Abc, and Ctp, not Mno, Abc, Zmp and Ctp.

    And the pivot grid is displaying exactly that first order.

    Regards,
    Eyup
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. Mohan
    Mohan avatar
    9 posts
    Member since:
    Aug 2018

    Posted 02 May in reply to Eyup Link to this post

    Hello Eyup,

    yeah I understand that but my question is more off, if I still want to achieve the order as i mentioned in my question, do we have any setting/trick to get this done ? 

  4. Answer
    Eyup
    Admin
    Eyup avatar
    3785 posts

    Posted 07 May Link to this post

    Hello Mohan,

    This is the current behavior of the pivot grid as stated here:
     "When the None sorting is active, the sort order will be determined by the original sort order from the data source."
    https://docs.telerik.com/devtools/aspnet-ajax/controls/pivotgrid/functionality/sorting

    You can sort the data coming from your database before passing it to the pivot grid.

    You can also log this idea in our public portal:
    https://feedback.telerik.com/Project/108

    Regards,
    Eyup
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  5. Mohan
    Mohan avatar
    9 posts
    Member since:
    Aug 2018

    Posted 15 May in reply to Eyup Link to this post

    Yeah. I created fake records in dataset in such a way that displays pivot columns as per my user's wish.
Back to Top