Persist Collapsed property of a RadSplitter on MasterPage

8 posts, 0 answers
  1. riz
    riz avatar
    3 posts
    Member since:
    Apr 2009

    Posted 01 Apr 2009 Link to this post

    Hi,
    In my web application, I use a master page for all pages.
    This master page contains a RadSplitter (horizontal orientation) which first pane's contains the header of my pages.

    The question is : is it possible to persit the Collapsed property when navigating from a page to another of the application.

    There is no way to set this property on server side and to use the Session to persist it for example...

    For example :
    If (PageReferrer.Master.RadPaneHeader.Collapsed = true) Then (this.Master.RadPaneHeader.Collapsed = true)

    Is there any solution to do that?
    Thanks for any help.
  2. Kevin
    Kevin avatar
    83 posts
    Member since:
    Sep 2008

    Posted 02 Apr 2009 Link to this post

    Riz,

    I might be able to help you with that problem, we had similar requirements in the need to keep a persisted "pinned / Unpinned" state for the the Splitter menu.. what we did to overcome the limitations of .NET was to use a WebService to capture a boolean value set clientside by the control, and whenever the master page did an onload event, it would check to see what the value of this boolean property was from the webservice, as the collapse / expand property can be set onload...

    Hope this is of help, can give you further details if you need :)

    Cheers
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 03 Apr 2009 Link to this post

    Hello Riz,

    Actually, Kevin is correct that you should use some technique to pass a parameter between the pages based on which to decide whether the pane should be collapsed or not. However, I can also suggest to use a javascript cookie in case you do not want to use a WebService because it will be more simple.

    All the best,
    Svetlina
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
  5. riz
    riz avatar
    3 posts
    Member since:
    Apr 2009

    Posted 16 Apr 2009 Link to this post

    Hi Kevin and Svetlina,

    I use a Javascript cookie to solve my problem and that works fine. The cookie is killed when the client session is terminated.
    Thanks a lot for your advises.

    Riz
  6. Waleed Seada
    Waleed Seada avatar
    241 posts
    Member since:
    May 2006

    Posted 24 Dec 2009 Link to this post

    Hello Svetlina ,

    I am running through the same requirement, could you please provide a full detailed solution using the Cookies.

    Best regards
    Waleed
  7. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 25 Dec 2009 Link to this post

    Hi Waleed,

    The implementation of a javascrpt cookie is not directly related to RadControls and RadSplitter but to general mechanisms of persisting and passing values. Thus we believe that you will be able to implement it yourself by using the information available on the net, e.g the following article is a good start:

    http://www.quirksmode.org/js/cookies.html

    In case you experience problems with the splitter and its API, provide more detailed explanations and source code with the splitter problem explained and we will do our best to help.

    Best wishes,
    Svetlina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  8. Waleed Seada
    Waleed Seada avatar
    241 posts
    Member since:
    May 2006

    Posted 26 Dec 2009 Link to this post

    Appreciate your help indeed.

     

    Best regards

    Waleed

  9. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 28 Dec 2009 Link to this post

    Hello Waleed,

    I am glad that the provided article is helpful, in case you encounter problems which are directly related to the RadSplitter control, you can share your code and we will examine it and do our best to help.


    Sincerely yours,
    Svetlina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017