Hi Fabian,
You are correct that it does not save the views to a file, it stores them in memory which means they won't persist after the application is closed.
It is possible to implement this behavior using the example you linked. All the example is doing is storing a string in a list for the rows, columns, filters and measures. The string is just the name of these so what you can do is after the pivot grid is saved, you can write the data in the lists to a stream and save that out as file. During the load you would read in the file first and place the data into the appropriate lists then call the method that is responsible for updating the view based on those lists.
Hi Rob,
Thanks for responding. Would you be able to post an example that creates such file to store the xampivotgrid views?
BTW, what was the intention for saving the views to memory and not to persist them into a file?
Fabian Zandomeni
This forum post has a sample project you can download that demonstrates how to serialize it to XML and binary files. https://ko.infragistics.com/community/forums/f/ultimate-ui-for-wpf/54668/some-questions-on-how-to-serilize-xampivotgrid/282250#282250
I believe the intention was to let the user determine what and how to save the data depending on what their needs are for their respective applications. This way you can pick and choose what specific items in the view you want saved as well as give you the ability to save the view into you're own file format that may contain other relevant data.
Let me know if you have any questions on this.
Thanks Rob,
I got it working now.
Cheers,
Fabian.