PivotGrid Custom Column Sorting (Ordering)

6 posts, 0 answers
  1. MikeB
    MikeB avatar
    42 posts
    Member since:
    May 2008

    Posted 20 Jul 2015 Link to this post

    Hello,

    We have a need to create a custom sort order for columns in a pivot grid.  (It's more like creating a Column Order rather than a Sort.)  For example, the columns are Size and the (Header) values are "S", "M", "L", "XL", "XXL" and the columns need to be displayed in this order.  The Row values would be the quantity ​for each size.  And to add a twist, the "Size" values are dependent on the product.  For example, a different product would have Size values of "S/M", "M/L", "L/XL".  So this functionality would need to be dynamic. 

    Is this possible?

     

    Thanks,

    Mike

  2. Dimitar
    Admin
    Dimitar avatar
    2960 posts

    Posted 21 Jul 2015 Link to this post

    Hello Michael,

    Thank you for writing.

    To achieve the desired functionality, you should create a custom GroupComaprer. I have attached a small sample that shows how this can be achieved with month names. I think that you should be able to adopt this approach easily.

    I hope this helps. 

    Regards,
    Dimitar
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. MikeB
    MikeB avatar
    42 posts
    Member since:
    May 2008

    Posted 29 Jul 2015 in reply to Dimitar Link to this post

    Thanks for the response Dimitar.  The sample works well with a single product.  But the customer can order different product in one order (one pivot grid).  Each product has it's own set of sizes.  When only one product is displayed the sort order is correct.  If more than one product is displayed in the grid, the columns are not sorted correctly.  Basically what we need is the product to "group" the product (which is the Rows), each with it's own sort order.  It seems that I have to inject the product in to the GroupComparer (when it is performing the sort.)  If you need more information I can create a spread sheet as an example of how it should look.

     

    Thanks,

    Mike

  4. Dimitar
    Admin
    Dimitar avatar
    2960 posts

    Posted 30 Jul 2015 Link to this post

    Hi Mike,

    Thank you for writing back. 

    It would be great if you could send us the spreadsheet. Could you please send us a snapshot of the pivot grid as well? This way we will have better understanding of your precise case.

    I am looking forward to your reply.

    Regards,
    Dimitar
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  5. Wenbo
    Wenbo avatar
    1 posts
    Member since:
    Sep 2015

    Posted 23 Jan in reply to Dimitar Link to this post

    Does it work on Telerik:RadPivotGrid web form? I tried to use DataProvider to add the customized column group description, but got "'RadPivotGrid' does not contain a definition for 'DataProvider' and no accessible extension method 'DataProvider'". Could you tell how to sort column header data using another field (such as "display_order") in RadPivotGrid web form? Thank you!
  6. Nadya
    Admin
    Nadya avatar
    486 posts

    Posted 25 Jan Link to this post

    Hello, Wenbo,

    I would like to note that this forum is related to the Telerik UI for WinForms suite. According to the provided information, it seems that you don't use RadPivotGrid from the WinForms suite. Feel free to post your question on the relevant forum according to the product that you use: https://www.telerik.com/forums 

    Thank you for your understanding.

    Regards,
    Nadya
    Progress Telerik

    Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Back to Top