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

Expand and Collapsing of rows

6 Answers 129 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
hamish
Top achievements
Rank 1
hamish asked on 23 Feb 2015, 06:15 PM
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

6 Answers, 1 is accepted

Sort by
0
hamish
Top achievements
Rank 1
answered on 25 Feb 2015, 07:53 PM
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
0
Polya
Telerik team
answered on 26 Feb 2015, 08:58 AM
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.

 
0
Swapnil
Top achievements
Rank 1
answered on 03 Jun 2019, 11:37 AM

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

0
Dilyan Traykov
Telerik team
answered on 03 Jun 2019, 01:19 PM
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.
0
Swapnil
Top achievements
Rank 1
answered on 04 Jun 2019, 07:28 AM

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

0
Dilyan Traykov
Telerik team
answered on 06 Jun 2019, 12:30 PM
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.
Tags
PivotGrid
Asked by
hamish
Top achievements
Rank 1
Answers by
hamish
Top achievements
Rank 1
Polya
Telerik team
Swapnil
Top achievements
Rank 1
Dilyan Traykov
Telerik team
Share this question
or