pivot grid default zone for fields

4 posts, 0 answers
  1. Piyush Bhatt
    Piyush Bhatt avatar
    166 posts
    Member since:
    Nov 2007

    Posted 08 Dec 2014 Link to this post

    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.

  2. Piyush Bhatt
    Piyush Bhatt avatar
    166 posts
    Member since:
    Nov 2007

    Posted 09 Dec 2014 Link to this post

    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.
  3. Piyush Bhatt
    Piyush Bhatt avatar
    166 posts
    Member since:
    Nov 2007

    Posted 09 Dec 2014 in reply to Piyush Bhatt Link to this post

    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.
  4. Angel Petrov
    Angel Petrov avatar
    1153 posts

    Posted 11 Dec 2014 Link to this post

    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.

    Angel Petrov

    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.

Back to Top