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

Modifying the field list

1 Answer 35 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
Jeremy
Top achievements
Rank 1
Jeremy asked on 01 Aug 2013, 01:41 PM
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

1 Answer, 1 is accepted

Sort by
0
Rosen Vladimirov
Telerik team
answered on 02 Aug 2013, 07:25 PM
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.

Regards,
Rosen Vladimirov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
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 >>
Tags
PivotGrid
Asked by
Jeremy
Top achievements
Rank 1
Answers by
Rosen Vladimirov
Telerik team
Share this question
or