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

Pivot field List - sort the field names

3 Answers 128 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
hamish
Top achievements
Rank 1
hamish asked on 21 Jul 2014, 07:46 PM
In the RadPivotFieldList the fields appear in the order in which it finds them in the underlying Data source. I would like the fields to appear in alphabetical order - is there anyway to do that ? (i.e. sort by field name etc.). I do not mean sorting the data (I can see how that is done), I just want the fields to appear in the field list in alphabetical order

Thanks

3 Answers, 1 is accepted

Sort by
0
Polya
Telerik team
answered on 23 Jul 2014, 11:53 AM
Hi Hamish,

Unfortunately, the extraction of items for the RadPivotFieldList (LabelFilter) is done internally and no ordering is applied to the results in any way - they are ordered in the way they are received.
I have created a feature request for this functionality which you can find here. You can track its status and vote to raise its priority and if it receives enough client demand we will consider implementing this feature.

Regards,
Polya
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Brett
Top achievements
Rank 1
answered on 11 Dec 2015, 06:45 PM

Hi Polya -

I would also like the ability to sort the fields in the RadPivotFieldList by a particular order. Is this still impossible? I attempted to apply the Order Data Annotation (https://msdn.microsoft.com/en-us/library/system.componentmodel.dataannotations.displayattribute.order(v=vs.110).aspx) but that had no effect.

Thanks,
Brett

0
Polya
Telerik team
answered on 16 Dec 2015, 09:28 AM
Hello Brett,

If you are using the LocalDataSourceProvider as your data provider you can add handler to the LocalDataSourceProvider.FieldDescriptionsProvider.GetDescriptionsDataAsyncCompleted event and in its handler reorder the field infos in the desired way. You can find more information about this event in our help article: http://docs.telerik.com/devtools/wpf/controls/radpivotgrid/events/overview#dataprovider-events

I've prepared a sample project demonstrating how to order the fields by caption. You can find it attached.
Hope this helps.

Regards,
Polya
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
Tags
PivotGrid
Asked by
hamish
Top achievements
Rank 1
Answers by
Polya
Telerik team
Brett
Top achievements
Rank 1
Share this question
or