Pivot field List - sort the field names

4 posts, 0 answers
  1. hamish
    hamish avatar
    44 posts
    Member since:
    Jun 2007

    Posted 21 Jul 2014 Link to this post

    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

  2. Polya
    Polya avatar
    199 posts

    Posted 23 Jul 2014 Link to this post

    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.

    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.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Brett
    Brett avatar
    10 posts
    Member since:
    Dec 2013

    Posted 11 Dec 2015 in reply to Polya Link to this post

    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.


  5. Polya
    Polya avatar
    199 posts

    Posted 16 Dec 2015 Link to this post

    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.

    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
Back to Top