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

RadPivotFieldList

13 Answers 422 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
Saykor
Top achievements
Rank 2
Saykor asked on 09 Aug 2012, 12:59 PM
Hi,
In RadPivotFieldList in Choose fields to add to report how i can remove the checkboxes and maybe setthe background on active fields?

I add a few fields in Row Labels and few in Values from cs code. it automatic show "Z Values" in Row Labes field. It need to be in Column Labels. Of course i can move it when load the screen but it is suppose to be there from the beginning not user to do this.

Visual Example

How I can remove Defer Layout Update and do it automatic when user drop a field  for report?

Regards,
Saykor

13 Answers, 1 is accepted

Sort by
0
Accepted
Rosen Vladimirov
Telerik team
answered on 13 Aug 2012, 05:49 AM
Hello Dimitar,

First of all thank you for choosing RadControls and evaluating our RadPivotGrid. Here are the answers of your questions:
 - to change the position of "Z values" you should use AggregatesPosition property (AggregatesPosition="Columns"). In addition you can set AggregatesLevel (ex. AggregatesLevel="1") property to specify its position in the output.
 - you can set DeferLayoutUpdate to false so the RadPivotGrid will update automatically. For the official release we'll have such property, but for now you can use the following code:
this.FieldList.ViewModel.DeferUpdates = false;

 - you can remove the checkboxes and change the background of used items by applying a style on the FieldBox. You need the IsUsed property which is boolean so you will have to apply our BooleanToVisibilityConverter converter to change the background. We would suggest you to apply a toggleButton or any other control if you don't want to use the checkboxes, but it is not mandatory.

To illustrate all of the above we have created a simple project where all these things are done. You can test it and inform us if you have anything else in mind.

We are really happy that you consider using our controls. Don't hesitate to contact us if you face any problems or if you have suggestions for us.

All the best,
Rosen Vladimirov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Saykor
Top achievements
Rank 2
answered on 13 Aug 2012, 07:26 AM
Works great
Thank you
0
Saykor
Top achievements
Rank 2
answered on 14 Aug 2012, 05:30 PM
How i can remove "Defer Layout Update" checkbox and Update button ?
Thanks
0
Accepted
Rosen Vladimirov
Telerik team
answered on 16 Aug 2012, 09:59 AM
Hello,

In the moment you cannot do this directly. The only way is to modify the ContentTemplate, but you don't have access to it with the current release. That's why we have applied this change for you and now if you use the attached xaml file the DeferLayoutUpdate checkbox and Update button will not be included in the FieldList.
We'll try to provide an easier way to do this in the future, but for now this is the workaround you may use.

Thanks for your understanding!

Regards,
Rosen Vladimirov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Saykor
Top achievements
Rank 2
answered on 16 Aug 2012, 11:32 AM
Work great,
Thank you
0
John Tobin
Top achievements
Rank 1
answered on 22 Oct 2012, 03:16 PM
Dear Telerik,

Sorry if I should create a new thread but I will put it here.

As Q3 2012 was released, could you upload a sample style for the new RadPivotFieldList please?
We are using the style which you have upload here but it does not work with Q3 anymore.

Thank you.
0
Rosen Vladimirov
Telerik team
answered on 23 Oct 2012, 09:12 AM
Hi Michael,

The ControlTemplate of the RadPivotFieldList control has changed a lot since the last release as there were many new features that needed a better visual presentation. We've added OLAP support to our RadPivotGrid, we are very close to adding KPI support, etc. As the end-user must be able to differ what kind of data is shown in the FieldList and that's why we have provided a different DataTemplate for each of them.

To help you I have modified the project from my previous post and you can use it as a reference. The changes are in the App.xaml file (search for the keyword "NOTE") and in the MainWindow.xaml.cs file.

Don't hesitate to contact us if you have any problems using this template.

Kind regards,
Rosen Vladimirov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
John Tobin
Top achievements
Rank 1
answered on 23 Oct 2012, 03:42 PM
Works perfect.
Thank you for your great help.
0
Mattias
Top achievements
Rank 1
answered on 14 Nov 2012, 10:02 AM
Thanks for that last sample! The workaround for the field list was a great remedy for me.

I have some questions about the PivotFieldList though;

1) I'm connecting the pivot table to my own POCO objects. Unfortunately they contain public properties that are not well suited for pivoting (such as IsValid, IsValidated, ErrorText, etc). Is there a way to supress those properties from the FieldList?

2) The properties of my POCO objects does not always have fully readable names for customers (such as SHTTransType). In the LocalDataSourceProvider I can set a CustomName which is picked up by the PivotGrid. Is it a bug/missing feature that the FieldList ignores those names, or is there another way to set custom names in the FieldList?
0
Rosen Vladimirov
Telerik team
answered on 15 Nov 2012, 04:21 PM
Hi Mattias,

Currently the only way to do  such filtering of the public properties is to set a custom FieldDescriptionsProvider. We'll try to set easier way in the future. To illustrate how to do it, we have prepared a simple project for you - our CustomFieldDescriptionsProvider inherits LocalDataSourceProvider and overrides it's GetDescriptions method.

For your second question - currently the CustomName is applied only on the RadPivotFieldList if you are using latest internal build.

Please check the attachment and inform us if it doesn't fit your needs.

Regards,
Rosen Vladimirov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Mattias
Top achievements
Rank 1
answered on 19 Nov 2012, 01:57 PM
Thanks for a great example!
This totally solves my first problem. However, problem two, renaming fields, does not work.
I tried to return a list of properties with renamed DisplayName:s, but unfortunately this crashes the pivot. (I would have thought that it internally uses the Name property to link between the controls, but that does not seem to be the case...)

If I misunderstood how to achieve a rename of properties (ie. "SNTTransType" => "TransactionType") I appreciate another example. Otherwise I'll just have to fall back to creating a wrapper POCO class that renames the properties to the users liking before presenting the data to the pivot.
0
Rosen Vladimirov
Telerik team
answered on 20 Nov 2012, 02:11 PM
Hi Mattias,

You can use CustomName property in your XAML. Note that this property is applied only on the GroupDescriptions and on the Headers in RadPivotGrid. In the top box of RadPivotFieldList you will see the default names of the properties. I'm attaching an image explaining this. Also I've modified the solution from my previous post to show CustomNames. You can find it attached as well.

Hopefully this helps.

All the best,
Rosen Vladimirov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Pat
Top achievements
Rank 1
answered on 30 May 2015, 02:27 AM

Old, but:

 DISABLE DEFER LAYOUT UPDATE (SET DEFER LAYOUT UPDATE TO FALSE):

 

`pivotFieldList.DataProvider.DeferUpdates = false;`

Tags
PivotGrid
Asked by
Saykor
Top achievements
Rank 2
Answers by
Rosen Vladimirov
Telerik team
Saykor
Top achievements
Rank 2
John Tobin
Top achievements
Rank 1
Mattias
Top achievements
Rank 1
Pat
Top achievements
Rank 1
Share this question
or