I am using a PivotFieldList associated to a PivotGrid which is bound to an in-memory table.
The Grid and the Field List work OK, but my problem is my table has too many columns. More than 200.
This make it a bit difficult for the user to choose fields from the field list.
I was wondering if there is a way to group fields in the PivotFieldList. Something like the "date" fields. Each group would be a node opening on user click and showing the available column.
3 Answers, 1 is accepted
Thank you for writing.
RadPivotFieldList groups date fields by design. Additional information considering the Value and Label option you can find in the following documentation article: RadPivotFieldList.
I am sending you attached a sample project showing how a date column is grouped in the field list editor, I am also sending you a gif file with the result on my end.
I hope this helps. Should you have further questions please do not hesitate to write back.
Regards,
Hristo Merdjanov
Telerik
Hi Hristo, thanks for your reply.
I understand the date fields grouping is by design.
What I am trying to do is to make it easier for the user to select a field out of 200 fields listed in the RadPivotFieldList. I was thinking of splitting them in groups, each group shown as a node, and opening on user click to show the group fields. I guess this is not possible.
Is it possible to hide fields in the RadPivotFieldList, without deleting them from the table, so that I could create an external toolbar that would hide / show groups of fields, according to the user selection?
Any other ideas / suggestions are welcome.
Regards,
Artemis
Thank you for writing back.
You could manipulate the Nodes collection of the tree contained in your RadPivotFieldList and move selected node to newly created parent nodes added to the tree. Since the control has its own logic for reordering and adding the nodes, you would need to perform this operation every time the data in the pivot grid gets updated.
I have modified my project to include a working example which should get you going. In case, you decide to go with the other solution and create a toolbar and later hide fields in the tree, you are going to need to iterate your nodes collection and set the Visible property of the selected node to false.
Besides my project, I am also sending you a gif file showing the result on my end.
I hope this helps. Should you have further questions please do not hesitate to write back.
Regards,
Hristo Merdjanov
Telerik