Hi there,
I have a strange issue that is haunting me and I hope you can help
I am using the XamGrid persistence Settings functionality to allow users to save and load grid settings at will, and this works fine.
The problem comes when people "share" settings... i.e user 1 creates a layout of the grid that they like, and clicks save. In my application this will grab the persistence settings from the grid, throw it into a Byte[], and save it to the Database. When this user loads up the application again, the settings are retrieved and loaded with no problem. Very slick!
User 2 also likes the look of the grid, so User 1 makes the database entry shared, so User 2 can now access his settings.
When user 2 loads up the application, the settings are retrieved correctly, but when they are applied to the grid, the grid goes blank.. No columns, no headers, no nothing at all...
I am wondering what is causing this issue as it is severaly impacting a project I am working on.
Does the persistence settings take some kind of GUID from the Grid?
If so, how can I resolve this problem?
Thanks
Sorry to bump, but was really hoping to get a response to this..
Hello Matt,
There isn't any unique number that is saved in the file, but if you send me an isolated sample project, where this is reproduced or at least a code snippet of your XamGRid definition and the code that loads the data and save/load the settings I would be able to investifate this further.
Looking forward for your reply.
I cannot really attach a full project as the overall project is very large with many moving parts, but I am attaching the relevant code snippets where the Grid settings are loaded/saved.
Many thanks,
Matt.
I have been looking into the code you have provided and I can suggest you add the XamGrid's ItemsSource to the PersistenceSettings' PropertySettings collection.
Ill try it, but the ItemSource will be different for each user, as the query used in retreiving the data is unique per user.
I was under the impression that this shouldn't matter as it is just the layout of the columns etc that we are saving/applyinhg.
If I am not mistaken, adding ItemSource will couple the grid to a particular data expectation..
I will update after testing.
I am looking forward to hear from you.
Excellent thanks!
I really hope this is picked up as the persistence stuff is really cool and my users love it when it works ;)
After some research Load XamGrid if persist fail has been determine as a new Product Idea. I have sent your Product Idea directly to our product management team. Our product team chooses new Product Ideas for development based on popular feedback from our customer base. Infragistics continues to monitor application development for all of our products, so as trends appear in requested ideas, we can plan accordingly.
We value your input, and our philosophy is to enhance our toolset based on customer feedback. If your idea is chosen for development, you will be notified at that time. Your reference number for this Product Idea is PI13050081
If you would like to follow up on your Product Idea at a later point, you may contact Developer Support management via email. Please include the reference number of your Product Idea in the subject and body of your email message. You can reach Developer Support management through the following email address: dsmanager@infragistics.com
The Peristence settings are stored in a PersistenceObject type, so it would be great is there was a simple way to traverse the XML to remove any reference to grid columns that no longer exist in the collection..
The Xml looks like:
<?xml version="1.0" encoding="utf-8"?><PersistenceObject xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Xml><?xml version="1.0" encoding="utf-16"?><GroupData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <TypeStore> <TypeDataPair> <LookupKey>-1474381838</LookupKey> <TypeName>Infragistics.Controls.Grids.SortDirection, InfragisticsSL5.Controls.Grids.XamGrid.v12.1, Version=12.1.20121.1016, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb</TypeName> </TypeDataPair> <TypeDataPair> <LookupKey>219087292</LookupKey> <TypeName>System.Windows.Visibility, System.Windows, Version=5.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e</TypeName> </TypeDataPair> <TypeDataPair>
etc etc... with a section of string entries defining the columns expected in the grid, and data links back to (presumably) the action to be performed on the grid item/column in question.
If these properties were exposed from the PersistenceObject, this would be trivial..
Cheers,
Hi There!
In trying to create a scenario where I could test your suggestion, I kind of stumbled across the answer...
My Grid settings are saving the entire layout.. Columns and all.. and it seems that between releases, or even between sessions, depending on whether use has gotten the latest verison of the Silverlight Client, the Grid Columns may be different.
This makes total sense now. However, it leaves me with a huge problem.
Our grid is the central driving data component of our application. And currently, there are 3 of them, and this will increase in the future, and the ability to store Grid Settings, and apply them without things exploding is a requirement.
My assumption was that the resulting XML of the Persistence settings would only work on the Columns that were Defined AND present, not blow up if a column appeared that was not defined, or defined but no longer present... Can I consider this a bug?
At least, is there a way to detect if the settings being applied do not match up with the Grid in the application?
That way, I could fail the grid settings application early, and give a message saying that they need to update the grid settings....
Or alternatively, is there a way to remove the resulting grid white out if this DOES happen...
Eagerly awaiting a reply!
Many thanks