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.
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.
Many thanks,
Matt.
Hello 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.
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.
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.
Another way of thinking about it is this:
In a Database there is a Persistence setting for a XamGrid. Every user has access to this, and on loading up the application, this grid settings are queried and applied to the grid.
The problem, is that the settings will only work for the 1 user that actually saved the setting from their grid... no one else. (hence me thinking it must be some kind of guid or identifier from somewhere... )
I appreciate this is a non-trivial issue to replicate or offer a coded solution to, but I really would appreciate the help..
Thanks again,