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

Is Filter Control State Telerik version specific ?

4 Answers 87 Views
Filter
This is a migrated thread and some comments may be shown as answers.
Shelly Kalra
Top achievements
Rank 1
Shelly Kalra asked on 20 Jan 2011, 02:13 PM
Hi,

I'm working on a page where i had used filter control (Telerik.Web.UI_2010_3_1215).
I'm saving state of filter control in database for later retrieval.
However, when I upgraded to the latest Telerik DLL (Telerik.Web.UI_2010_3_1317), state failed to load.
I've used following methods to save & load filter state -
           public string SaveExpression(object state)
        {
            ObjectStateFormatter formatter = new ObjectStateFormatter();
            return formatter.Serialize(state);
        }
 
        public object LoadExpression(string savedState)
        {
            ObjectStateFormatter formatter = new ObjectStateFormatter();
            return formatter.Deserialize(savedState);
        }


So, I wish to know if the state is dll version specific.
Concern here is, if we move to a higher Telerik version in future, we'll no longer be able to retrieve filter state.
Please advice.

4 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 20 Jan 2011, 03:34 PM
Hello Shelly,

I recommend that you examine the "Save/Load RadFilter expressions" section in the following link:
RadFilter Basics

Let us know if you need more information.

Regards,
Daniel
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Shelly Kalra
Top achievements
Rank 1
answered on 21 Jan 2011, 07:09 AM
Thanks.Can you please provide an example of db storing/loading state using BinaryFormatter ?
0
Daniel
Telerik team
answered on 24 Jan 2011, 05:30 PM
Hello Shelly,

You could use the same code you used for ObjectStateFormatter, just set the SettingsFormatter property to RadFilterSettingsFormatter.BinaryFormatter.
RadFilter1.SettingsFormatter = RadFilterSettingsFormatter.BinaryFormatter;

In both cases RadFilter will return Base64 formatted string that you could save to your database.

Regards,
Daniel
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Shelly Kalra
Top achievements
Rank 1
answered on 25 Jan 2011, 09:53 AM
Thanks !
Tags
Filter
Asked by
Shelly Kalra
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Shelly Kalra
Top achievements
Rank 1
Share this question
or