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

GridSettingsPersister - error when updating DLL

13 Answers 228 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Eric Tarasoff
Top achievements
Rank 1
Eric Tarasoff asked on 09 Apr 2010, 09:48 PM
Hi,

We used the GridSettingsPersister helper class to allow users to save "views" and store those settings in a database.

We upgraded our DLL to the newest release and it seems we are now getting this error. Thoughts?

Thanks

Could not load file or assembly 'Telerik.Web.UI, Version=2009.3.1314.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileLoadException: Could not load file or assembly 'Telerik.Web.UI, Version=2009.3.1314.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Source Error:

 

Line 78:             LosFormatter formatter = new LosFormatter();

Line 79:             StringReader reader = new StringReader(settings);

Line 80:             object[] gridSettings = (object[])formatter.Deserialize(reader);

Line 81:             //Load groupBy

Line 82:             GridGroupByExpressionCollection groupByExpressions = this.gridInstance.MasterTableView.GroupByExpressions;

13 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 12 Apr 2010, 04:27 PM
Hello Eric,

Please, review the following article which elaborates on this subject and let me know if it helps:
General Troubleshooting

Regards,
Pavlina
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Richard Gregg
Top achievements
Rank 1
answered on 28 Apr 2010, 07:01 AM
Hi Pavlina ,
I have the exact same issue (except upgrading from 2009.2.826.35 to 2010.1.309.35). I looked through the link you provided and didn't see anything even close to this problem. Is there any way to manually upgrade these encodings in out database?
0
Pavlina
Telerik team
answered on 29 Apr 2010, 02:30 PM
Hello Richard,

Could you please check whether you have references to the previous versions either in your web.config or GAC?

In the meantime I suggest you review the following articles which elaborates on this subject :
Error: Could not load file or assembly 'Telerik.Web.UI
Updating RadControls for ASP.NET to another version or license
Meet Telerik. Web.Design.dll 

Sincerely yours,
Pavlina
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Richard Gregg
Top achievements
Rank 1
answered on 30 Apr 2010, 06:33 AM
Pavlina,

I only have the new version of the control in the GAC, and no mention of Telerik in the web.config at all (if it matters in's a SharePoint app).

I looked at the links you passed but they didn't help at all.
    1) Like I said there is no mention of Telerik in the web.config.
    2) This is the standard upgrade procedure that I have done. It's worth mentioning here that the new version of Telerik.Web.UI is working perfectly. the only issue is that I can't use LosFormater to load a ViewState that was stored in a database using the old Teletik.Web.UI assembly.
    3) Not exactly sure why you sent that last link but if it helps I am using VS2008 SP1.

It seems you might be a little confused about the error Eric described (assuming our errors are the same, which it sounds like). The procedure was that I used GridSettingsPersister to save some grid settings to a DB while using version 2009.2.826.35. This data could be loaded correctly while using 2009Q2. I then upgraded to version 2010.1.309.35 and now when loading the same data using 2010Q1 I get the error Eric described.

I believe that the fully qualified version name is stored somewhere in the ViewState string. I have used ASP.NET ViewState Helper 1.4.1 and it also gives the error:
Could not load file or assembly 'Telerik.Web.UI, Version=2009.2.826.35, Culture=neutral, PublicKey=121fae78165ba3d4'

I'm not sure if this will help but here is the string:
/wEUKwALFCsAAA9oaBYEHgJfY2YeATAWBB4DX2ZuBQhMYXN0TmFtZR4DX3NvCyl1VGVsZXJpay5XZWIuVUkuR3JpZFNvcnRPcmRlciwgVGVsZXJpay5XZWIuVUksIFZlcnNpb249MjAwOS4yLjgyNi4zNSwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj0xMjFmYWU3ODE2NWJhM2Q0ADLlFwABAAAA/////wEAAAAAAAAABAEAAADpAVN5c3RlbS5Db2xsZWN0aW9ucy5HZW5l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////8////BhgAAAADRG9CCRkAAAAB5v////z///8GGwAAAAZBZ2VEb0IJHAAAAAHj/////P///wYeAAAAA0RvRAkfAAAAAeD////8////BiEAAAAGR2VuZGVyCSIAAAAB3f////z///8GJAAAAANCZWQJJQAAAAHa/////P///wYnAAAADEFkbWl0dGVkRGF0ZQkoAAAAAdf////8////BioAAAAOQWRtaXR0ZWRQZXJpb2QJKwAAAAHU/////P///wYtAAAABFdhcmQJLgAAAAHR/////P///wYwAAAABFVuaXQJMQAAAAHO/////P///wYzAAAADENvbnN1bHRpbmdEcgk0AAAAAcv////8////BjYAAAAOTGFzdFRlc3RSZXN1bHQJNwAAAAHI/////P///wY5AAAAFE15UGF0aWVudHNfQWRkUmVtb3ZlCToAAAAFBwAAABJTeXN0ZW0uV2ViLlVJLlBhaXICAAAABUZpcnN0BlNlY29uZAICBQAAAAgIAgAAAAk7AAAAAQoAAAAHAAAACAgDAAAACTwAAAABDQAAAAcAAAAICAQAAAAJPQAAAAEQAAAABwAAAAgIBQAAAAk+AAAAARMAAAAHAAAACAgGAAAACT8AAAABFgAAAAcAAAAICAsAAAAJQAAAAAEZAAAABwAAAAgICAAAAAlBAAAAARwAAAAHAAAACAgJAAAACUIAAAABHwAAAAcAAAAICAoAAAAJQwAAAAEiAAAABwAAAAgIDAAAAAlEAAAAASUAAAAHAAAACAgHAAAACUUAAAABKAAAAAcAAAAICA0AAAAJRgAAAAErAAAABwAAAAgIDgAAAAlHAAAAAS4AAAAHAAAACAgPAAAACUgAAAABMQAAAAcAAAAICBAAAAAJSQAAAAE0AAAABwAAAAgIEwAAAAlKAAAAATcAAAAHAAAACAgRAAAACUsAAAABOgAAAAcAAAAICBQAAAAJTAAAAAU7AAAAHlN5c3RlbS5XZWIuVUkuV2ViQ29udHJvbHMuVW5pdAIAAAAEdHlwZQV2YWx1ZQQAIlN5c3RlbS5XZWIuVUkuV2ViQ29udHJvbHMuVW5pdFR5cGUFAAAABgUAAAAFs////yJTeXN0ZW0uV2ViLlVJL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lvbj0yLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2FdXQwFAAAATVN5c3RlbS5XZWIsIFZlcnNpb249Mi4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iMDNmNWY3ZjExZDUwYTNhBPz////rAVN5c3RlbS5Db2xsZWN0aW9ucy5HZW5lcmljLktleVZhbHVlUGFpcmAyW1tTeXN0ZW0uU3RyaW5nLCBtc2NvcmxpYiwgVmVyc2lvbj0yLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldLFtTeXN0ZW0uV2ViLlVJLlBhaXIsIFN5c3RlbS5XZWIsIFZlcnNpb249Mi4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iMDNmNWY3ZjExZDUwYTNhXV0CAAAAA2tleQV2YWx1ZQEEElN5c3RlbS5XZWIuVUkuUGFpcgUAAAAGBgAAAARUSENJCQcAAAAB+P////z///8GCQAAAANVUk4JCgAAAAH1/////P///wYMAAAACVVSTk5vU2l0ZQkNAAAAAfL////8////Bg8AAAAETmFtZQkQAAAAAe/////8////BhIAAAAJU2hvcnROYW1lCRMAAAAB7P////z///8GFQAAAANBZ2UJFgAAAAHp/////P///wYYAAAAA0RvQgkZAAAAAeb////8////BhsAAAAGQWdlRG9CCRwAAAAB4/////z///8GHgAAAANEb0QJHwAAAAHg/////P///wYhAAAABkdlbmRlcgkiAAAAAd3////8////BiQAAAADQmVkCSUAAAAB2v////z///8GJwAAAAxBZG1pdHRlZERhdGUJKAAAAAHX/////P///wYqAAAADkFkbWl0dGVkUGVyaW9kCSsAAAAB1P////z///8GLQAAAARXYXJkCS4AAAAB0f////z///8GMAAAAARVbml0CTEAAAABzv////z///8GMwAAAAxDb25zdWx0aW5nRHIJNAAAAAHL/////P///wY2AA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xMWQ1MGEzYQT8////6wFTeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYy5LZXlWYWx1ZVBhaXJgMltbU3lzdGVtLlN0cmluZywgbXNjb3JsaWIsIFZlcnNpb249Mi4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XSxbU3lzdGVtLldlYi5VSS5QYWlyLCBTeXN0ZW0uV2ViLCBWZXJzaW9uPTIuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49YjAzZjVmN2YxMWQ1MGEzYV1dAgAAAANrZXkFdmFsdWUBBBJTeXN0ZW0uV2ViLlVJLlBhaXIFAAAABgYAAAAEVEhDSQkHAAAAAfj////8////BgkAAAADVVJOCQoAAAAB9f////z///8GDAAAAAlVUk5Ob1NpdGUJDQAAAAHy/////P///wYPAAAABE5hbWUJEAAAAAHv/////P///wYSAAAACVNob3J0TmFtZQkTAAAAAez////8////BhUAAAADQWdlCRYAAAAB6f////z///8GGAAAAANEb0IJGQAAAAHm/////P///wYbAAAABkFnZURvQgkcAAAAAeP////8////Bh4AAAADRG9ECR8AAAAB4P////z///8GIQAAAAZHZW5kZXIJIgAAAAHd/////P///wYkAAAAA0JlZAklAAAAAdr////8////BicAAAAMQWRtaXR0ZWREYXRlCSgAAAAB1/////z///8GKgAAAA5BZG1pdHRlZFBlcmlvZAkrAAAAAdT////8////Bi0AAAAEV2FyZAkuAAAAAdH////8////BjAAAAAEVW5pdAkxAAAAAc7////8////BjMAAAAMQ29uc3VsdGluZ0RyCTQAAAABy/////z///8GNgAAAA5MYXN0VGVzdFJlc3VsdAk3AAAAAcj////8////BjkAAAAUTXlQYXRpZW50c19BZGRSZW1vdmUJOgAAAAw7AAAAV1RlbGVyaWsuV2ViLlVJLCBWZXJzaW9uPTIwMDkuMi44MjYuMzUsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49MTIxZm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CwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XSxbU3lzdGVtLk9iamVjdFtdLCBtc2NvcmxpYiwgVmVyc2lvbj0yLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldXQMAAAAHVmVyc2lvbghDb21wYXJlcghIYXNoU2l6ZQADAAiSAVN5c3RlbS5Db2xsZWN0aW9ucy5HZW5lcmljLkdlbmVyaWNFcXVhbGl0eUNvbXBhcmVyYDFbW1N5c3RlbS5TdHJpbmcsIG1zY29ybGliLCBWZXJzaW9uPTIuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OV1dCAAAAAAJAgAAAAAAAAAEAgAAAJIBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuR2VuZXJpY0VxdWFsaXR5Q29tcGFyZXJgMVtbU3lzdGVtLlN0cmluZywgbXNjb3JsaWIsIFZlcnNpb249Mi4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0AAAAACwcAAAAAAAAAQA== 
0
Eric Tarasoff
Top achievements
Rank 1
answered on 03 May 2010, 09:25 PM
Pavlina,

Any more help with this issue?

I was putting off dealing with this problem but now need to solve it soon. Unlike Richard, I am physically including the assembly and have it referenced in web.config...not GAC.

Like Richard, I want to really *persist* these settings in a database...not just temporarily as part of a session or something like that.

Help???

Thanks,
Eric
0
Pavlina
Telerik team
answered on 05 May 2010, 11:25 AM
Hello,

Could you please, open a support ticket and send us a project along with steps and screenshots how to reproduce the problem on our side? Once we are able to reproduce it we will do our best to help.

Best wishes,
Pavlina
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Doug Beard
Top achievements
Rank 1
answered on 11 May 2010, 09:24 PM
I have this problem I have been unable to solve over the last two releases.  It's intermitten, only occurs in the design upon certain controls (Splitter, ScriptManager, StyleSheetManager, AjaxManager, etc) but not on others (WindowManager, FormDesorator, LoadingPanel)

What was the solution?

0
Pavlina
Telerik team
answered on 13 May 2010, 09:07 AM
Hi Doug,

Do you have a reference to the Telerik.Web.Design assembly in your project?
For more information about how to address design-time errors, please refer to the following blog post:
Meet Telerik. Web.Design.dll 

Sincerely yours,
Pavlina
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Doug Beard
Top achievements
Rank 1
answered on 13 May 2010, 03:31 PM
EDIT: removed due to irrelevance.


0
Doug Beard
Top achievements
Rank 1
answered on 13 May 2010, 04:47 PM
I can't believe it, I finally found the problem.
I found Telerik assemblies deposited in the following directory:
C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE

This directory is NOT indexed by MS Search utility and therefore when I searched for existing Telerik assemblies they did not show up.
The version of the Telerik assemblies with in this directory were 2009.3.1314.35 which was uninstall long ago from my machine.

Once I saw via the Fusion log that the assemblies were being loaded from this very unusual IRL, I knew that was the problem.

Clearly this was an error within the Telerik 2009 installer.
What a nightmare, but what a relief to put it behind me.

0
Pavlina
Telerik team
answered on 14 May 2010, 03:38 PM
Hello Doug,

I am happy to hear you have found a solution for your case. And thank you for sharing your experience with the community.

Do not hesitate to write us again if any questions arise.

Sincerely yours,
Pavlina
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Richard Gregg
Top achievements
Rank 1
answered on 19 May 2010, 03:32 AM

Ok, the good news is I have solved the problem, or more specifically have a workaround that still lets me use the settings I had in the database. the bad news is it was quite involved (sorry about the length of this post) but I thought I should give it to the community and Eric in particular.

 

The main issue was with the LosFormatter class having problems with the change in Telerik.Web.IU version and given that Microsoft documentation said:

This is a private format, and only needs to remain consistent for the lifetime of a Web request. You are not allowed 
to persist objects serialized with this formatter for any significant length of time.  
 
Note   This format may be modified in the future.  
 
I thought it might be best to remove my reliance on LosFormatter before it comes back and bites me again and again.

First I went back to Telerik's help page where I first got the GridSettingsPersister from (http://www.telerik.com/help/aspnet-ajax/grdsavingsettingsonperuserbasis.html) an noted it had been changed a little. The original I had was using an array of objects to store all the various settings. Now it used some custom designed classes however it was still reliant on LosFormatter and used the IStateManager for some settings (if groupBy) that I'm also nervus about possible future changes that could cause issues. So I took the idea of creating custom classes to store the data and extended it to all the data. Well all the data I need and a bit more, I'm not aware of anything I missed but I'm sure I probably did, if any of you find something I look forward to reading your additions. So my classes that I use to store all the grids settings are:
    /// <summary>  
    /// Stores all the settings that define a RadGrids layout. eg. GroupBy, Paging, Scrolling,  
    /// Column, Sorting and Filtering settings  
    /// </summary>  
    [Serializable]  
    public class RadGridSettings  
    {
        #region Properties  
 
        public double Version  
        { getset; }  
 
        public bool GroupByDisplay_Visible  
        { getset; }  
 
        public bool GroupByDisplay_Enabled  
        { getset; }  
 
        public bool Paging_AllowPaging  
        { getset; }  
 
        public int Paging_PageSize  
        { getset; }  
 
        public bool Scrolling_AllowScroll  
        { getset; }  
 
        public bool Scrolling_EnableVirtualScrollPaging  
        { getset; }  
 
        public int Scrolling_FrozenColumnsCount  
        { getset; }  
 
        public bool Scrolling_SaveScrollPosition  
        { getset; }  
 
        public Unit Scrolling_ScrollBarWidth  
        { getset; }  
 
        public Unit Scrolling_ScrollHeight  
        { getset; }  
 
        public bool Scrolling_UseStaticHeaders  
        { getset; }  
 
        public List<GroupByExpressionSettings> GroupByExpressions  
        { getset; }  
 
        public bool Sort_AllowMultiColumnSorting  
        { getset; }  
 
        public bool Sort_AllowNaturalSort  
        { getset; }  
 
        public List<SortExpressionSettings> Sort_SortExpressions  
        { getset; }  
 
        public string FilterExpression  
        { getset; }  
 
        public List<ColumnSettings> ColumnSettings  
        { getset; }  
 
        public List<ColumnSettings> AutoGeneratedColumnSettings  
        { getset; }
        #endregion  
 
    }//class  
 
    /// <summary>  
    /// Stores info about a single GroupByExpression that is needed to restore that setting  
    /// </summary>  
    [Serializable]  
    public class GroupByExpressionSettings : IComparable<GroupByExpressionSettings>  
    {  
        /// <summary>  
        /// The field name to sort by  
        /// </summary>  
        public string Expression  
        { getset; }  
 
        /// <summary>  
        /// The order to sort this field  
        /// </summary>  
        public int Index  
        { getset; }  
 
        /// <summary>  
        /// The Aggregate for the grouped field  
        /// </summary>  
        public GridAggregateFunction GroupByFields_Aggregate  
        { getset; }  
 
        /// <summary>  
        /// The FormatString for the grouped field  
        /// </summary>  
        public string GroupByFields_FormatString  
        { getset; }  
 
        /// <summary>  
        /// The text to show to the user for the grouped field  
        /// </summary>  
        public string GroupByFields_HeaderText  
        { getset; }  
 
        /// <summary>  
        /// The HeaderValueSeparator for the grouped field  
        /// </summary>  
        public string GroupByFields_HeaderValueSeparator  
        { getset; }  
 
        /// <summary>  
        /// The SortOrder for the grouped field  
        /// </summary>  
        public GridSortOrder GroupByFields_SortOrder  
        { getset; }  
 
        /// <summary>  
        /// The Aggregate for the grouped field  
        /// </summary>  
        public GridAggregateFunction SelectFields_Aggregate  
        { getset; }  
 
        /// <summary>  
        /// The FormatString for the grouped field  
        /// </summary>  
        public string SelectFields_FormatString  
        { getset; }  
 
        /// <summary>  
        /// The text to show to the user for the grouped field  
        /// </summary>  
        public string SelectFields_HeaderText  
        { getset; }  
 
        /// <summary>  
        /// The HeaderValueSeparator for the grouped field  
        /// </summary>  
        public string SelectFields_HeaderValueSeparator  
        { getset; }  
 
        /// <summary>  
        /// The SortOrder for the grouped field  
        /// </summary>  
        public GridSortOrder SelectFields_SortOrder  
        { getset; }
        #region IComparable<GroupByExpressionSettings> Members  
 
        public int CompareTo(GroupByExpressionSettings other)  
        {  
            return (this.Index.CompareTo(other.Index));  
        }
        #endregion  
    }  
 
    /// <summary>  
    /// Stores info about a single column that is needed to restore that columns settings  
    /// </summary>  
    [Serializable]  
    public class ColumnSettings  
    {  
 
        public string UniqueName  
        { getset; }  
 
        public int OrderIndex  
        { getset; }  
 
        public Unit Width  
        { getset; }  
 
        public bool Visible  
        { getset; }  
 
        public bool Display  
        { getset; }  
 
        public GridKnownFunction CurrentFilterFunction  
        { getset; }  
 
        public string CurrentFilterValue  
        { getset; }  
 
        public bool IsRunTimeColumn  
        { getset; }  
 
        public string RunTimeColumn_HeaderText  
        { getset; }  
 
        public string RunTimeColumn_DataField  
        { getset; }  
 
        public string RunTimeColumn_DataFormatString  
        { getset; }  
 
        public string RunTimeColumn_HeaderTooltip  
        { getset; }  
 
    }//class  
 
    /// <summary>  
    /// Stores info about a sorted column that is needed to restore the sort setting  
    /// </summary>  
    [Serializable]  
    public class SortExpressionSettings  
    {  
        /// <summary>  
        /// The field name to sort by  
        /// </summary>  
        public string FieldName  
        { getset; }  
 
        /// <summary>  
        /// The order to sort this field  
        /// </summary>  
        public GridSortOrder SortOrder  
        { getset; }  
    }  
 
You will note a few things included in this data structure that some of you may want to remove because you simply don't need it. The first is I added a version number, I did this so I can tell when loading how this was created and change my loading to accommodate. The second thing I added that 99% wont need is the CollumnSettings.IsRunTimeColumn and CollumnSettings.RunTimeColumn_??? properties. I use these because I have a grid that can have columns created at runtime that are not auto generated and I need to recreate. The trick I use is all of these columns have a common prefix to there UniqueName, you will see this in my Save and Load methods but it could be removed if you don't need it and speed is an issue.

Then I had to change my SaveSettings and LoadSettings methods to use the new data structures.

Below is my SaveSettings method that populates the new data structures. Note that I'm Serializing my class as XML, this means that the values in my database are now human readable and if I ever have issues I can manually make changes.

 

        private const Double CURRENT_SAVE_VERSION = 3.0;

 

 

        private const double MIN_COLUM_WIDTH_PIXEL = 20;

 


        /// <summary>  
        /// This method Converts the settings of a RadGrid into a string that can  
        /// be restored latter. The settings saved are:  
        /// * Group by values  
        /// * Sorting  
        /// * Column order  
        /// * Filter expressions  
        /// * Column visibility  
        /// * Column Display  
        /// * Column filter  
        /// </summary>  
        /// <param name="Grid">The RadGrid to load the settings into</param>  

 

        /// <param name="DynamicColumnPreFix">The prefix in UniqueName that all dynamically created columns have</param>

 

        public static string SaveSettings(RadGrid Grid, string DynamicColumnPreFix)  
        {  
            // All the settings get saved into an object that is then serialized  
            RadGridSettings gridSettings = new RadGridSettings();  
 
            // Save the version  
            gridSettings.Version = CURRENT_SAVE_VERSION;  
 
 
            // Save groupBy  
            gridSettings.GroupByExpressions = new List<GroupByExpressionSettings>();  
            foreach (GridGroupByExpression expression in Grid.MasterTableView.GroupByExpressions)  
            {  
                GroupByExpressionSettings GroupExp = new GroupByExpressionSettings();  
                GroupExp.Expression = expression.Expression;  
                GroupExp.Index = expression.Index;  
 
                GroupExp.GroupByFields_Aggregate = expression.GroupByFields[0].Aggregate;  
                GroupExp.GroupByFields_FormatString = expression.GroupByFields[0].FormatString;  
                GroupExp.GroupByFields_HeaderText = expression.GroupByFields[0].HeaderText;  
                GroupExp.GroupByFields_HeaderValueSeparator = expression.GroupByFields[0].HeaderValueSeparator;  
                GroupExp.GroupByFields_SortOrder = expression.GroupByFields[0].SortOrder;  
 
                GroupExp.SelectFields_Aggregate = expression.SelectFields[0].Aggregate;  
                GroupExp.SelectFields_FormatString = expression.SelectFields[0].FormatString;  
                GroupExp.SelectFields_HeaderText = expression.SelectFields[0].HeaderText;  
                GroupExp.SelectFields_HeaderValueSeparator = expression.SelectFields[0].HeaderValueSeparator;  
                GroupExp.SelectFields_SortOrder = expression.SelectFields[0].SortOrder;  
 
                gridSettings.GroupByExpressions.Add(GroupExp);  
            }  
            gridSettings.GroupByExpressions.Sort();  
 
 
            // Save groupBy visable/enabled settings  
            gridSettings.GroupByDisplay_Visible = Grid.GroupPanel.Visible;  
            gridSettings.GroupByDisplay_Enabled = Grid.GroupPanel.Enabled;  
 
 
            // Save sort expressions  
            gridSettings.Sort_AllowMultiColumnSorting = Grid.MasterTableView.SortExpressions.AllowMultiColumnSorting;  
            gridSettings.Sort_AllowNaturalSort = Grid.MasterTableView.SortExpressions.AllowNaturalSort;  
            gridSettings.Sort_SortExpressions = new List<SortExpressionSettings>();  
            foreach (GridSortExpression sort in Grid.MasterTableView.SortExpressions)  
            {  
                SortExpressionSettings SortExp = new SortExpressionSettings();  
                SortExp.FieldName = sort.FieldName;  
                SortExp.SortOrder = sort.SortOrder;  
 
                gridSettings.Sort_SortExpressions.Add(SortExp);  
            }  
 
 
            // Save column info including order, width, filter, etc. This includes any existing  
            // dynamic run time added columns (ie. remark columns)  
            int columnsLength = Grid.MasterTableView.Columns.Count + Grid.MasterTableView.AutoGeneratedColumns.Length;  
            ArrayList allColumns = new ArrayList(columnsLength);  
            allColumns.AddRange(Grid.MasterTableView.Columns);  
            allColumns.AddRange(Grid.MasterTableView.AutoGeneratedColumns);  
 
            gridSettings.ColumnSettings = new List<ColumnSettings>();  
            foreach (GridColumn column in allColumns)  
            {  
                // Create a new column with the basic column details  
                ColumnSettings ColSetting = new ColumnSettings();  
                ColSetting.UniqueName = column.UniqueName;  
                ColSetting.OrderIndex = column.OrderIndex;  
                ColSetting.Width = column.HeaderStyle.Width;  
                ColSetting.Visible = column.Visible;  
                ColSetting.Display = column.Display;  
                ColSetting.CurrentFilterFunction = column.CurrentFilterFunction;  
                ColSetting.CurrentFilterValue = column.CurrentFilterValue;  
 
                // If the column is a dynamically created column store the extra info required to reload it  
                if (!string.IsNullOrEmpty(DynamicColumnPreFix) && column.UniqueName.StartsWith(DynamicColumnPreFix))  
                {  
                    ColSetting.IsRunTimeColumn = true;  
                    ColSetting.RunTimeColumn_HeaderText = column.HeaderText;  
                    ColSetting.RunTimeColumn_DataField = ((GridBoundColumn)column).DataField;  
                    ColSetting.RunTimeColumn_DataFormatString = ((GridBoundColumn)column).DataFormatString;  
                    ColSetting.RunTimeColumn_HeaderTooltip = column.HeaderTooltip;  
                }  
                else 
                    ColSetting.IsRunTimeColumn = false;  
 
                // Add the column details to the grid setting's details  
                gridSettings.ColumnSettings.Add(ColSetting);  
            }  
 
 
            // Save filter expression  
            gridSettings.FilterExpression = Grid.MasterTableView.FilterExpression;  
 
 
            // Save the Paging settings  
            gridSettings.Paging_AllowPaging = Grid.MasterTableView.AllowPaging;  
            gridSettings.Paging_PageSize = Grid.MasterTableView.PageSize;  
 
 
            // Save the Scrolling settings  
            gridSettings.Scrolling_AllowScroll = Grid.ClientSettings.Scrolling.AllowScroll;  
            gridSettings.Scrolling_EnableVirtualScrollPaging = Grid.ClientSettings.Scrolling.EnableVirtualScrollPaging;  
            gridSettings.Scrolling_FrozenColumnsCount = Grid.ClientSettings.Scrolling.FrozenColumnsCount;  
            gridSettings.Scrolling_SaveScrollPosition = Grid.ClientSettings.Scrolling.SaveScrollPosition;  
            gridSettings.Scrolling_ScrollBarWidth = Grid.ClientSettings.Scrolling.ScrollBarWidth;  
            gridSettings.Scrolling_ScrollHeight = Grid.ClientSettings.Scrolling.ScrollHeight;  
            gridSettings.Scrolling_UseStaticHeaders = Grid.ClientSettings.Scrolling.UseStaticHeaders;  
 
 
            // Serialize and return all the settings pulled from the RadGrid  
            StringWriter writer = new StringWriter();  
            XmlSerializer xSerializer = new XmlSerializer(gridSettings.GetType());  
            xSerializer.Serialize(writer, gridSettings);  
            return writer.ToString();  
        }  
 
Note if you keep the DynamicColumnPreFix

This is my LoadSettings method. Note that this also enforces a min column width that you may want to remove:
 
        /// <summary>  
        /// This method Loads a RadGrids settings from a string (created by SaveSettings()).  
        /// Note: The Rebind() method needs to be called after to apply the new settings  
        /// </summary>  
        /// <param name="Grid">The RadGrid to load the settings into</param>  
        /// <param name="Settings">The settings to load</param>  

 

        /// <param name="DynamicColumnPreFix">The prefix in UniqueName that all dynamically created columns have</param>

 

        public static void LoadSettings(RadGrid Grid, string Settings, string DynamicColumnPreFix)  
        {  
            // Deserialize all the settings into an object that is then loaded from  
            RadGridSettings gridSettings;  
            try 
            {  
                StringReader reader = new StringReader(Settings);  
                XmlSerializer xSerializer = new XmlSerializer(typeof(RadGridSettings));  
                gridSettings = (RadGridSettings)xSerializer.Deserialize(reader);  
            }  
            catch (Exception ex_V3)  
            {  
                try 
                {  
                    // Try loading settings as version 2 (pre XML encoding)  
                    LoadSettings_V2(Grid, Settings, DynamicColumnPreFix);  
                    return;  
                }  
                catch 
                {  
                    throw new Exception("Could not load with V3+ or V2. See inner exception for V3+ error (debug for V2 error).", ex_V3);  
                }  
            }  
 
            // Get the version  
            if (gridSettings.Version < 3)  
                // All versions without a version number are consided to be version 1.0 and cant be loaded  
                // V2 (like V1) was using LosFormater not XmlSerializer and can't be loaed with this function anymore  
                throw new Exception("Can NOT load grid setting because its format is a version < 3.0.");  
 
 
            // Load groupBy  
            //GridGroupByExpressionCollection groupByExpressions = Grid.MasterTableView.GroupByExpressions;  
            Grid.MasterTableView.GroupByExpressions.Clear();  
 
            // Note this assumes that gridSettings.GroupByExpressions is orded by index  
            // ie. gridSettings.GroupByExpressions.Sort() was called by SaveSettings()   
            foreach (GroupByExpressionSettings GroupExp in gridSettings.GroupByExpressions)  
            {  
                GridGroupByExpression expression = new GridGroupByExpression(GroupExp.Expression);  
 
                expression.GroupByFields[0].Aggregate = GroupExp.GroupByFields_Aggregate;  
                expression.GroupByFields[0].FormatString = GroupExp.GroupByFields_FormatString;  
                expression.GroupByFields[0].HeaderText = GroupExp.GroupByFields_HeaderText;  
                expression.GroupByFields[0].HeaderValueSeparator = GroupExp.GroupByFields_HeaderValueSeparator;  
                expression.GroupByFields[0].SortOrder = GroupExp.GroupByFields_SortOrder;  
 
                expression.SelectFields[0].Aggregate = GroupExp.SelectFields_Aggregate;  
                expression.SelectFields[0].FormatString = GroupExp.SelectFields_FormatString;  
                expression.SelectFields[0].HeaderText = GroupExp.SelectFields_HeaderText;  
                expression.SelectFields[0].HeaderValueSeparator = GroupExp.SelectFields_HeaderValueSeparator;  
                expression.SelectFields[0].SortOrder = GroupExp.SelectFields_SortOrder;  
 
                Grid.MasterTableView.GroupByExpressions.Add(expression);  
                //Grid.MasterTableView.GroupByExpressions.Add(new GridGroupByExpression(GroupExp.Expression));  
            }  
 
 
            // Load groupBy visable/enabled settings  
            Grid.GroupPanel.Visible = gridSettings.GroupByDisplay_Visible;  
            Grid.ShowGroupPanel = Grid.GroupPanel.Visible;  
            Grid.GroupPanel.Enabled = gridSettings.GroupByDisplay_Enabled;  
 
 
            // Load sort expressions  
            Grid.MasterTableView.SortExpressions.AllowMultiColumnSorting = gridSettings.Sort_AllowMultiColumnSorting;  
            Grid.MasterTableView.SortExpressions.AllowNaturalSort = gridSettings.Sort_AllowNaturalSort;  
 
            Grid.MasterTableView.SortExpressions.Clear();  
            foreach (SortExpressionSettings SortExp in gridSettings.Sort_SortExpressions)  
            {  
                GridSortExpression expression = new GridSortExpression();  
                expression.FieldName = SortExp.FieldName;  
                expression.SortOrder = SortExp.SortOrder;  
                Grid.MasterTableView.SortExpressions.Add(expression);  
            }  
 
            // Load dynamically run time added columns  
            // First remove any existing dynamic/run time added columns  
            int i = 0;  
            while (i < Grid.MasterTableView.Columns.Count)  
                if (Grid.MasterTableView.Columns[i].UniqueName.StartsWith(DynamicColumnPreFix))  
                    Grid.MasterTableView.Columns.RemoveAt(i);  
                else 
                    i++;  
 
            i = 0;  
            // Recreate all the dynamic/run time added columns  
            foreach (ColumnSettings ColSetting in gridSettings.ColumnSettings)  
            {  
                if (ColSetting.IsRunTimeColumn)  
                {  
                    GridBoundColumn col = new GridBoundColumn();  
                    col.UniqueName = ColSetting.UniqueName;  
                    Grid.MasterTableView.Columns.Add(col);  
                    col.HeaderText = ColSetting.RunTimeColumn_HeaderText;  
                    col.DataField = ColSetting.RunTimeColumn_DataField;  
                    col.DataFormatString = ColSetting.RunTimeColumn_DataFormatString;  
                    col.HeaderTooltip = ColSetting.RunTimeColumn_HeaderTooltip;  
                }  
 
                // Get the starting index for any new columns (ie. not saved columns)  
                if (ColSetting.OrderIndex >= i)  
                    i = ColSetting.OrderIndex + 1;  
            }  
 
            int columnsLength = Grid.MasterTableView.Columns.Count + Grid.MasterTableView.AutoGeneratedColumns.Length;  
 
            ArrayList allColumns = new ArrayList(columnsLength);  
            allColumns.AddRange(Grid.MasterTableView.Columns);  
            allColumns.AddRange(Grid.MasterTableView.AutoGeneratedColumns);  
 
            // Load columns order, width, visible/displayed and their current filter values/functions  
            foreach (GridColumn column in allColumns)  
            {  
                ColumnSettings MatchingColumn = gridSettings.ColumnSettings.Find(delegate(ColumnSettings col)  
                {  
                    return col.UniqueName == column.UniqueName;  
                });  
                if (MatchingColumn != null)  
                {  
                    // Load the columns index and width  
                    column.OrderIndex = MatchingColumn.OrderIndex;  
                    column.HeaderStyle.Width = MatchingColumn.Width;  
                    if (column.HeaderStyle.Width.IsEmpty || column.HeaderStyle.Width.Value < MIN_COLUM_WIDTH_PIXEL)  
                        column.HeaderStyle.Width = MatchingColumn.Width;  
 
                    // Load the columns visable and display settings  
                    column.Visible = MatchingColumn.Visible;  
                    column.Display = MatchingColumn.Display;  
 
                    // Load the columns filter function and value  
                    column.CurrentFilterFunction = MatchingColumn.CurrentFilterFunction;  
                    column.CurrentFilterValue = MatchingColumn.CurrentFilterValue;  
                }  
                else 
                {  
                    // This column did not exist when the view was saved, give it an index afer  
                    // all 'older' columns.  
                    column.OrderIndex = i;  
                    i++;  
 
                    // This column did not exist when the view was saved, so don't show it in this view  
                    column.Visible = false;  
                    column.Display = true;  
 
                    // This column did not exist when the view was saved, so it has no filter  
                    column.CurrentFilterFunction = GridKnownFunction.NoFilter;  
                    column.CurrentFilterValue = null;  
                }  
            }  
 
 
            // Load filter expression  
            Grid.MasterTableView.FilterExpression = gridSettings.FilterExpression;  
 
 
            // Load paging settings  
            Grid.MasterTableView.AllowPaging = gridSettings.Paging_AllowPaging;  
            Grid.MasterTableView.PageSize = gridSettings.Paging_PageSize;  
 
 
            // Load scrolling settings  
            Grid.ClientSettings.Scrolling.AllowScroll = gridSettings.Scrolling_AllowScroll;  
            Grid.ClientSettings.Scrolling.EnableVirtualScrollPaging = gridSettings.Scrolling_EnableVirtualScrollPaging;  
            Grid.ClientSettings.Scrolling.FrozenColumnsCount = gridSettings.Scrolling_FrozenColumnsCount;  
            Grid.ClientSettings.Scrolling.SaveScrollPosition = gridSettings.Scrolling_SaveScrollPosition;  
            Grid.ClientSettings.Scrolling.ScrollBarWidth = gridSettings.Scrolling_ScrollBarWidth;  
            Grid.ClientSettings.Scrolling.ScrollHeight = gridSettings.Scrolling_ScrollHeight;  
            Grid.ClientSettings.Scrolling.UseStaticHeaders = gridSettings.Scrolling_UseStaticHeaders;  
        }  
 
You will not there is some error checking that calls LoadSettings_V2() this means that you can still load settings created before this upgrade. Well at least I could if I was referencing the old version of the Telerik.Web.UI assembly.

To upgrade all the settings I already had in my database I took the sample app I had created for the support ticket I created for this bug and added some code so it would load each record in the DB then save it again after calling SaveSettings.

And thats it, my solution.
0
Veli
Telerik team
answered on 20 May 2010, 12:58 PM
Hello guys,

What you observed to be an assembly reference exception is actually caused by the LosFormatter. Let me try to explain how it works.

The LosFormatter has been designed for easy serialization of simple data types to strings. The reason it is used in the ViewState persistence mechanism is that, more often than not, you would be saving simple data values in the ViewState fields of your controls. And this is what the LosFormatter does best - it quickly serializes values of some type: int, String, Boolean, Pair, Triple, Array, ArrayList and Hashtable.

Even though the LosFormatter serializes only some data types fast, this doesn't mean you cannot serialize any data type. When you try to that, however, the LosFormatter will first  check if there is an available TypeConverter registered for this data type and use that. And if there is no TypeConverter available, it will turn to the BinaryFormatter. This is where assembly version issues appear.

I believe issues with the BinaryFormatter and assembly versioning are beyond the scope of this conversation. There are a lot of external resources that can be referred to. How it relates to our topic, is that serialization may break on both changing versions of the Telerik.Web.UI.dll, as well as the GridSettingsPersister.

Note that the GridSettingsPersister example given in the online demos and help is just one option you can go with. There are plenty of other ways for persisting grid settings. In any case, you are definitely encouraged to modify the example to fit your needs.

Some of you have already observed that the GridSettingsPersister was rewritten. It was refactored, simplified and extended by allowing you to save and load settings in more than a string format. Together with that, it is now easier to customize. You can note that changing the string serialization logic is as easy as modifying the GridSettingsCollection.ToString() to generate the string, and GridSettingsCollection.LoadFromSerializedData(string data) to load the settings from a string. It can be any string format - XML, JSON, or any other.

Finally, let me note that we are still unable to reproduce these assembly versioning issues with the current version of the GridSettingsPersister. If we can reproduce any of the versioning issues described by the community using the new version of the persister, we would be able to take some action toward improving it. Therefore, anybody who is able to reproduce deserialization errors on replacing the Telerik.Web.UI assembly is encouraged to send us a sample project we can test locally. You can attach it to a formal support thread and refer to this forum post if needed. This will be of great help for us.

Regards,
Veli
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Grid
Asked by
Eric Tarasoff
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Richard Gregg
Top achievements
Rank 1
Eric Tarasoff
Top achievements
Rank 1
Doug Beard
Top achievements
Rank 1
Veli
Telerik team
Share this question
or