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
Look forward to your response
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.
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.
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.
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.
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.
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.