This is a migrated thread and some comments may be shown as answers.

LoadLayout removes new columns

3 Answers 127 Views
GridView
This is a migrated thread and some comments may be shown as answers.
IT Department
Top achievements
Rank 1
IT Department asked on 19 Jan 2011, 06:03 PM
We are having a problem using LoadLayout with RadGrid after releasing a new version that has new columns added. It seems that LoadLayout completely replaces the original columns with those listed in the layout XML file, and the new columns are gone. They are not just hidden, they have been completely removed.

The only way that we have been able to solve this problem is to rename the XML file with every release, causing the previous saved layout to be ignored. This is very irritating to users because they may have made several changes to the default column layout and after an upgrade they have to start over.

Is there a way to still use LoadLayout to preserve the user's column and grouping preferences, but not destroy newly added columns?

3 Answers, 1 is accepted

Sort by
0
Richard Slade
Top achievements
Rank 2
answered on 19 Jan 2011, 06:25 PM
Hello,

As far as I know, no. The layout will perofrm the layout that is detailed in the XML file. What we tend to do is when load layout is ensure that the layout xml file is not older than the executable. If it is, then we delete it. It means that the user has to re-save a new layout, but it gets over all of these issues.

Hope that helps
Richard
0
IT Department
Top achievements
Rank 1
answered on 19 Jan 2011, 07:10 PM
Using the file dates for the XML and the assembly solves only half of the problem, which we are already solving by appending the version to the XML file name. The main complaint is the need to reset all of the user preferences after every upgrade. We have about 40 customers using our application, and a lot of the columns are specific requests from a single customer. Most users actually want to hide over half of the columns, and everytime we do an upgrade they have to repeat this process.

If this is just the way it works, then we will have to save all of the individual column and grouping settings as separate values. Not a problem, I was just looking for an easier solution.
0
Richard Slade
Top achievements
Rank 2
answered on 19 Jan 2011, 09:00 PM
Hi again Grant,

Actually, this has been discussed before and there is actually a sample project available on how to overcome this very issue. Please have a look at this forum thread (linked to answer) which should help you.

Let me know if you have further questions
Richard
Tags
GridView
Asked by
IT Department
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
IT Department
Top achievements
Rank 1
Share this question
or