Hi, In my proect I have to save the pivot grid view in an xml file and load it from the xml. I make it like the following example.
https://ko.infragistics.com/samples/silverlight/pivot-grid/#/save-and-load-views
There is only one diffrence that I take the XML information from another page with the URL. And read it like following lines.
SavedPivotGridView XMLSerializedView = new SavedPivotGridView();
XmlSerializer serializer = new XmlSerializer(typeof(SavedPivotGridView)); StringReader stringReader = new StringReader(QueryResult); XMLSerializedView = (SavedPivotGridView)serializer.Deserialize(stringReader);
XMLSerializedView.Fill(this.pivotGrid);
The problem is that the levels are not getting expanded when the load method run. I think the problem is about to SavedPivotGridView class. But I could not find. Any suggestion?
Thanks for your response. The description you gave makes more than enough sense to wait for the next service release.
Hello JHaynes,
The new sample I mentioned in the previous post will enable you to save and restore the exact state of a pivot grid. The class used for storing the state information is serializable and exporting to xml comes down to calling a single method that will do all the needed work. Restoring a view works in a similar manner. If you need it, we could also provide you with some sample code for saving views to a database. Once a view is saved, it can be restored to any pivot grid that uses the same datasource (meaning a view can be accessed by multiple users if needed).
In a nutshell, you will just be required to decide exactly how to use this functionality in your application.
If you need more details or if you have any further questions we would be glad to answer them.
Philip
Can anyone give some insight on the "new and improved" sample and how it will function? I'm currently in the decision process on whether or not this control will suit the requirements we're looking for. By function I mean, will there be any built in code to save the views to a database / XML file without any intensive custom code required?
Thanks!
We are using diffrent SavedPivotGridView classes. I take this class from 2011.1 version of Silverlight DV. And it is not checking the loaded hierarchies.
Now, I got examine your sample and it worked for my data source. Thank you.
I tried your code and it seems to be working normally - I was able to serialize and then deserialize a view of the pivot grid where some members were expanded. I am attaching the sample in case you want to try it yourself.
In your case make sure that you wait enough time when restoring a serialized view - if multiple hierarchies have to be loaded/filtered and if the connection/cube is slow this may be a time consuming job. Then for some time it would appear that no expansion is happening. Could you check if this is what is happening to you?