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

pivot grid default zone for fields

3 Answers 106 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
Piyush Bhatt
Top achievements
Rank 2
Piyush Bhatt asked on 08 Dec 2014, 11:50 PM
My need is to create the pivot grid programmatically and allow users to pivot the fields that they like. 

1) As soon as the data is bound to the pivot grid, it automatically creates some of the fields as RowPivotGrid and some as Aggregate etc. How to control this behavior? By the time _FieldCreated event is called, the field with Telerik's assumed type is already created. How can we override this behavior so that we check the field Name, Type etc and provide proper type for it?  (we tried to initialize fields by adding fields to Fields collection but they show up on the pivot grid, we are trying to control the "All Fields" in the panel)

2) Also for DateTime type of fields, Telerik automatically adds fields like "-Month", "-Week" etc - but while dragging them on to the grid, the month or week are not properly displayed and they don't have correct group interval either. 

Basically I am looking for the best place to gain access to the fields displayed in "All Fields" and setting them properly to Row/Column type so that when user drags them they only go to valid sections.

Thanks,

3 Answers, 1 is accepted

Sort by
0
Piyush Bhatt
Top achievements
Rank 2
answered on 09 Dec 2014, 04:33 PM

I found the answer to this partially. The field's IsHidden property should be set to TRUE to add field to the ALL FIELDS but not add to the pivotgrid. 

I still need response on DateTime field.
0
Piyush Bhatt
Top achievements
Rank 2
answered on 09 Dec 2014, 04:41 PM
Partial answer to second question is here - http://www.telerik.com/forums/fieldswindow-are-creating-unnecesary-fields 

Though it only says you can remove those fields but not about setting its properties correctly so it works. In some cases Quarter and Month are nice to have. If the control adds these fields, it should automatically set their GroupInterval level and Display Format correctly so they are group by quarter or month. In our testing, this did not work correctly - it always treats "Quarter" and "Month" columns as dates too.
0
Angel Petrov
Telerik team
answered on 11 Dec 2014, 03:36 PM
Hello Piyush,

Actually the mentioned fields are of type DateTime and the behavior experienced is expected. If you have some custom requirement regarding this matter I would recommend logging a feature request in our feedback portal. That way our developers will examine it and if possible improve the control functionality for a future release.

Regards,
Angel Petrov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
PivotGrid
Asked by
Piyush Bhatt
Top achievements
Rank 2
Answers by
Piyush Bhatt
Top achievements
Rank 2
Angel Petrov
Telerik team
Share this question
or