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

PivotGrid Custom Column Sorting (Ordering)

5 Answers 110 Views
PivotGrid and PivotFieldList
This is a migrated thread and some comments may be shown as answers.
MikeB
Top achievements
Rank 1
MikeB asked on 20 Jul 2015, 09:49 PM

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

5 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 21 Jul 2015, 03:27 PM
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
0
MikeB
Top achievements
Rank 1
answered on 29 Jul 2015, 11:21 PM

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

0
Dimitar
Telerik team
answered on 30 Jul 2015, 08:31 AM
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
0
Wenbo
Top achievements
Rank 1
answered on 23 Jan 2021, 04:04 PM
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!
0
Nadya
Telerik team
answered on 25 Jan 2021, 09:36 AM

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/.

Tags
PivotGrid and PivotFieldList
Asked by
MikeB
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
MikeB
Top achievements
Rank 1
Wenbo
Top achievements
Rank 1
Nadya
Telerik team
Share this question
or