Is Filter Control State Telerik version specific ?

5 posts, 0 answers
  1. Shelly Kalra
    Shelly Kalra avatar
    5 posts
    Member since:
    May 2010

    Posted 20 Jan 2011 Link to this post

    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.
  2. Daniel
    Admin
    Daniel avatar
    4946 posts

    Posted 20 Jan 2011 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Shelly Kalra
    Shelly Kalra avatar
    5 posts
    Member since:
    May 2010

    Posted 21 Jan 2011 Link to this post

    Thanks.Can you please provide an example of db storing/loading state using BinaryFormatter ?
  5. Daniel
    Admin
    Daniel avatar
    4946 posts

    Posted 24 Jan 2011 Link to this post

    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.
  6. Shelly Kalra
    Shelly Kalra avatar
    5 posts
    Member since:
    May 2010

    Posted 25 Jan 2011 Link to this post

    Thanks !
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017