Expand and Collapsing of rows

7 posts, 0 answers
  1. hamish
    hamish avatar
    44 posts
    Member since:
    Jun 2007

    Posted 23 Feb 2015 Link to this post

    We have a pivot grid that has 3 levels of dimensions to it: (for example):
    1 Company
         1.1. Account
                1.1.1. Ticker
    2 Company
         2.1. Account
            2.1.1. Ticker
    etc.
    When the user clicks on the plus sign next to Company it expands out to accounts and then if they click on the plus sign next to Account it expands to Ticker etc. The problem we are having is as soon as we refresh the data the previously selected expansions all go away and it defaults to back what it was at the start either expanded or collapsed. We are refreshing the data by rebuilding a collection of data records which we then assign to the Pivots dataprovder.Items source .
    My question is how can we maintain the previously expanded and collapsed rows between data refresh's - thank you
  2. hamish
    hamish avatar
    44 posts
    Member since:
    Jun 2007

    Posted 25 Feb 2015 in reply to hamish Link to this post

    Would it be possible to get a response to this question. This is causing us some difficultly. Also as the data providers data source we are using an observable collection. I would have thought that changes made to the observable collections fire the notifyproperty changed event which the pivot grid should react to. It does not appear to do so and we have to re assign the collection to the item source which in turn refresh's the grid but resets all of the rows collapsed status.
    Look forward to your response
  3. Polya
    Admin
    Polya avatar
    267 posts

    Posted 26 Feb 2015 Link to this post

    Hi Hamish,

    RadPivotGrid doesn't support such scenario out of the box. However there is a workaround that you can use - you can create a dictionary and save the state of the rows/columns. After the provider is completed (you can use StatusChanged event of the provider) you can try to find each group from the dictionary and restore its state. I've prepared a sample project to demonstrate this approach.

    Hopefully this helps and is suitable for your scenario.

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

     
  4. Swapnil
    Swapnil avatar
    14 posts
    Member since:
    Nov 2017

    Posted 03 Jun 2019 Link to this post

    Hi,

    Could you please send the code again as it is not attached in the reply. 

    Currently I use the PivotChartViewModel_Completed event to set the expanded state but there are times when this event is not fired, especially after we load the RadPivotFieldList(it is placed in a docked RadPane). 

    The DataProviderStatusChanged event is not working for us.

     

    Please provide a recourse.

    Regards,

    Swapnil

  5. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    1054 posts

    Posted 03 Jun 2019 Link to this post

    Hi Swapnil,

    I'm reattaching the project my colleague Polya set up for your reference.

    Could you please have a look and let us know if the proposed approach would work for your specific scenario?

    I will be looking forward to your reply.

    Regards,
    Dilyan Traykov
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  6. Swapnil
    Swapnil avatar
    14 posts
    Member since:
    Nov 2017

    Posted 04 Jun 2019 in reply to Dilyan Traykov Link to this post

    Hi Dilyan,

    Unfortunately the proposed approach is not working in our scenario. Let me tell you our design. 

    We have a timer running every 4 seconds, where we update the LocalDataSourceProvider initializing it with a new instance of our datasource. We use BlockUntilRefreshCompletes in the timer. Here we also capture the expanded state of the rows.

    Then in the PivotChartViewModel_Completed event, we restore the state. 

    We have a RadPivotFieldList in a RadDocking which is minimized. The restoration works fine. However, when we restore the RadPivotFieldList, the PivotGrid gets minimized and the restoration does not work.

    Please suggest a recourse.

     

    Regards,

    Swapnil

  7. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    1054 posts

    Posted 06 Jun 2019 Link to this post

    Hi Swapnil,

    Would you find it possible to update the project I provided to better demonstrate your setup and the issue you're experiencing as I'm having trouble replicating it at my end?

    You can then upload the updated project to a storage provider of your choice and send the link here as our forum system only allows for image files to be attached. I will then review the project and try to suggest a viable solution for your particular scenario.

    Thank you in advance for your cooperation on the matter. I will be awaiting your reply.

    Regards,
    Dilyan Traykov
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top