Initially collapse fields dragged from fieldlist

18 posts, 1 answers
  1. Sjoerd
    Sjoerd avatar
    9 posts
    Member since:
    Oct 2011

    Posted 14 Jan 2013 Link to this post

    Great news to be able to use pivotgrids!  Some questions though:

    When I drag a field from the fieldlist into the row or column area, it is initially show expanded. Is it possible to initially show it collapsed?

    Thanks
    Sjoerd
  2. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 15 Jan 2013 Link to this post

    Hello,

    Thank you for your feedback. 

    Currently it is not possible to collapse/expand rows and groups when data changes. However it seems to be a powerful feature and I added it in our issue tracking system. Use
     this link to follow the issue status. I updated your Telerik points for this suggestion. We will try to adjust our API to allow this scenario in our upcoming release.

    If you have any other questions, do not hesitate to as

    All the best,
    Jack
    the Telerik team
    Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Sjoerd
    Sjoerd avatar
    9 posts
    Member since:
    Oct 2011

    Posted 16 Jan 2013 Link to this post

    Thanks for your prompt reply.

    In that case, wouldn't it be better to initialy collapse groups by default and let the user choose whether or not ot expand one or more groups? 

    That would be in line with Excel and SQL. The extra property for opening expanded could then be added in some later version, but the component then at least behaves as most users expect, especially with larger lists.

    I tried to find a work-around for now, but could not see how to access the fields that are included in the pivotgrid, let alone how to expand/collapse them. Surely an oversight on my behalf. Any chance you can point me in the right direction?

    Thanks
    Sjoerd
  5. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 16 Jan 2013 Link to this post

    Hi Sjoerd,

    Directly to your questions:

    1. Our current implementation is designed to show rows expanded by default. Our tests indicate that MS Excel behaves exactly the same way. However, your suggestion makes sense and we will consider changing this behavior. In any case we will add an API that allows changing it in a simple way.

    2. You can access all group fields (rows and columns) by using the ColumnRootGroup and RowRootGroup properties of PivotGridElement. Consider the sample below:
    foreach (PivotGroupNode node in this.radPivotGrid1.PivotGridElement.RowRootGroup.Children)
    {
        node.Expanded = false;
    }

    However, there is no event that allows changing groups expanded state when a field is being added. We will improve our documentation and API for our first stable release.

    Should you have other questions, do not hesitate to contact us.

    Kind regards,
    Jack
    the Telerik team
    Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
  6. Sjoerd
    Sjoerd avatar
    9 posts
    Member since:
    Oct 2011

    Posted 16 Jan 2013 Link to this post

    Thanks Jack,

    It seems that your Excel behaves different from mine (hidden feature, I guess). I just tried this in Excel again, and when I drag a field to the row or column area it is consistently displayed as collapsed. That is regardless whether I drag the field to a row/column label are within the field list or directly on the grid area.

    I am using Excel 2010, and the data source is an Analysis Services cube. Could that be the difference?

    For now I will make your code available to the user via some control. The way forward it would be good to have an event to capture the adding, changing and removing of fields from the rid.

    Thanks so far,
    Sjoerd
  7. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 18 Jan 2013 Link to this post

    Hello Sjoerd,

    I am posting here a video demonstrating the behavior on my side. I am using Excel 2010 with default settings. Maybe there is an option that specifies this behavior and we plan to proceed the same way. We will allow the user to specify the behavior or RadPivotGrid.
     
    Greetings,
    Jack
    the Telerik team
    Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
  8. Sjoerd
    Sjoerd avatar
    9 posts
    Member since:
    Oct 2011

    Posted 18 Jan 2013 Link to this post

    Weird indeed. However, looking at your video I realized the source of the miscommunication.

    You are correct that all root values are displayed by default when you drag a new field into the grid.

    However, I was dragging a dimension field with a user hierarchy into the grid. Here too, all values at the top level are immediately shown, but none of these is expanded by default. In the attached example you can see I dragged the publication date on the grid, which initially display only year values (1978 was manually expanded by me). With the Telerik pivotgrid the entire hierarchy is initially expanded down to the day level.

    This may sound a trivial thing, but especially with OLAP-based grids the number of nodes in a dimension can be huge.

    Anyway, I'm happy with the proposed approach.

    Thanks
    Sjoerd
  9. Answer
    Jack
    Admin
    Jack avatar
    2335 posts

    Posted 21 Jan 2013 Link to this post

    Hi Sjoerd,

    Thank you for these details. Now I understand the case. We will consider it when implementing the feature.

    Fell free to contact us if you have other questions.
     
    Greetings,
    Jack
    the Telerik team
    Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
  10. Luis Gilbert
    Luis Gilbert avatar
    15 posts
    Member since:
    Jul 2009

    Posted 15 Jun 2013 Link to this post

    Is this functionality included in 2013 Q2 release?
    Perhaps, a new event was added to control initial collapse functionality?
  11. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 19 Jun 2013 Link to this post

    Hi Luis,

    Thank you for your question. In Q1 2013 we included an event named GroupExpandedChanged.

    I hope this event will be useful for your scenario.

    Regards,
    Peter
    Telerik
    RadChart for WinForms is obsolete. Now what?
  12. Madhuri k. chaube
    Madhuri  k. chaube avatar
    8 posts
    Member since:
    Mar 2014

    Posted 18 Mar 2014 Link to this post

    I was generate a report in telerik using toggle visibility but it shows all the information in expanded form and I want this information Initially in collapse form and after clicking on '+' it will expanded.....plz give a suggestion its urgent........
  13. Dess
    Admin
    Dess avatar
    1601 posts

    Posted 20 Mar 2014 Link to this post

    Hello Madhuri,

    Thank you for contacting Telerik Support.

    According to the provided information, it seems that your question is related to the Telerik Reporting product. As this forum is purposed to handle questions about Telerik UI for WinFoms, I would kindly ask you to post your question in the Reporting forum. Thus, you can contact the Telerik Reporting community and deal with the difficulty that you are experiencing.

    Thank you for your understanding.

    Regards,
    Desislava
    Telerik
     

    Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

     
  14. Prabhu
    Prabhu avatar
    8 posts
    Member since:
    Apr 2014

    Posted 09 Apr 2014 Link to this post

    Hello Sir,
     I've more than three sub header in pivodgrid  when i click 1st headercell its show next header with collapse button then others.. like to end...

    but i need , when i'm  expand 1st click in header its show all sub header  upto datafield without expand/collapse button.. is it possible...
    please tell me soon
  15. Madhuri k. chaube
    Madhuri  k. chaube avatar
    8 posts
    Member since:
    Mar 2014

    Posted 09 Apr 2014 in reply to Prabhu Link to this post

    Currently it is not possible to collapse/expand rows and groups when data changes. However it seems to be a powerful feature .

    But I will try to solve it soon....

    thanx
  16. Madhuri k. chaube
    Madhuri  k. chaube avatar
    8 posts
    Member since:
    Mar 2014

    Posted 09 Apr 2014 in reply to Dess Link to this post

    Ok and Thank Tou for suggession
  17. George
    Admin
    George avatar
    500 posts

    Posted 11 Apr 2014 Link to this post

    Hello,

    Thank you for writing.

    Prabhu, I am not entirely certain what you are trying to achieve. If you want to hide the expand/collapse buttons you can use GroupElementFormatting​:
    void pivotGrid_GroupElementFormatting(object sender, PivotGroupElementEventArgs e)
    {
        e.GroupElement.ExpanderElement.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
    }

    If this is not what you mean, I would like to kindly ask you to provide me with more details about what you are trying to achieve.

    Let me know if you need further assistance.

    Regards,
    George
    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.

     
  18. Prabhu
    Prabhu avatar
    8 posts
    Member since:
    Apr 2014

    Posted 15 Apr 2014 Link to this post

    Thanks to reply..
    Is it possible to decorate(change fore color) header cell in Pivotgrid..

    ref: Attached image marked in red color
  19. Ivan Todorov
    Admin
    Ivan Todorov avatar
    688 posts

    Posted 18 Apr 2014 Link to this post

    Hello Prahbu,

    It is possible to decorate all elements in RadPivotGrid using the appropriate events. In particular, formatting the headers can be achieved by handling the events as shown below. Note that they are formatting the two different types of headers. You might find the following help article useful as it describes the element structure of RadPivotGrid.
    public Form1()
    {
        InitializeComponent();
        this.radPivotGrid1.GroupElementFormatting += radPivotGrid1_GroupElementFormatting;
        this.radPivotGrid1.GroupDescriptorElementCreating += radPivotGrid1_GroupDescriptorElementCreating;
    }
     
    //fires for the elements in the Column descriptors area and for the Row descriptors area
    void radPivotGrid1_GroupDescriptorElementCreating(object sender, Telerik.WinControls.UI.GroupDescriptorElementCreatingEventArgs e)
    {
        if (e.Axis == Telerik.Pivot.Core.PivotAxis.Columns)
        {
            e.GroupDescriptorElement.BackColor = Color.Red;
            e.GroupDescriptorElement.NumberOfColors = 1;
        }
    }
     
    //fires for the Column headers and for the Row headers
    void radPivotGrid1_GroupElementFormatting(object sender, Telerik.WinControls.UI.PivotGroupElementEventArgs e)
    {
        if (e.GroupElement.Data.Axis == Telerik.Pivot.Core.PivotAxis.Columns)
        {
            e.GroupElement.BackColor = Color.Lime;
        }
    }

    I hope you find this useful.

    Regards,
    Ivan Todorov
    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.

     
Back to Top
UI for WinForms is Visual Studio 2017 Ready