Modifying the field list

2 posts, 0 answers
  1. Jeremy
    Jeremy avatar
    11 posts
    Member since:
    Jul 2011

    Posted 01 Aug 2013 Link to this post

    Firstly can I congratulate you on the pivotgrid, its fantastic and saved me an incredible amount of time.

    Having produced my first couple of tools that utilise the pivotgrid and fieldlist there a couple of things I would like to achieve and was hoping that it might be possible

    1. when including a date field, the field list creates a number of subfields (year, month,etc) is it possible to control this to only display some of the items.

    2. I would like to include similar items in the field list and it would make sense to group them into a folder as you have with date, is this possible

    3.I would like to stipulate certain string formats, so for example if I know the format of a field will be £0.00 I would like to force this at the code level, currently if the user modifies the localdatasourceprovider it will just present the figure as a double.

    Once again congratulations
  2. Rosen Vladimirov
    Rosen Vladimirov avatar
    640 posts

    Posted 02 Aug 2013 Link to this post

    Hi Jeremy,

    Thank you very much for your great words. We are really working hard in order to satisfy all your needs. Here are the answers of your questions:

    1) Yes, you can control which items to be visible by using LocalDataSourceFieldDescriptionsProvider's AddingContainerNode event. You can find more information in our online help. Also you can check this SDK Example which demonstrates the same approach.

    2) In order to achieve this, you will have to create your own FieldDescriptionProvider that inherits LocalDataSourceFileldDescriptionsProvider and override GetFieldDescriptionHierarchy method. You can find out how to achieve this in the attached project.

    3) You can use StringFormat property of the PropertyAggregateDescription to set the format in your code:
    <pivot:PropertyAggregateDescription PropertyName="Net" StringFormat="C"/>

    The "C" format will use the local currency, but you may use different format, for example "$ #.##".

    Hopefully this helps. Feel free to contact us in case you have any problems with suggested solutions. And once again, thank you very much for your great words.

    Rosen Vladimirov
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top