How to collapse RadSlidingPane programmatically through java script or code behind?

7 posts, 1 answers
  1. Shirish
    Shirish avatar
    11 posts
    Member since:
    Jan 2013

    Posted 31 Jan Link to this post

    Hello Telerik team,

    I am trying to achieve collapsing RadSlidingPane programmatically in java script or on server side but no luck.

    Here what I am exactly trying to achieve:
    I am having a search criteria with Search button in RadSlidingPane & I want to collapse all search criteria when user hits a Search button (which is also in the RadSlidingPane). Everything else working perfectly fine.

    I wan to do this using java script or on server side so please let me know how to do this. Also please let me know if you need any additional information.

    Thanks in advance.

    Regards
    Shirish

     

     

  2. Vessy
    Admin
    Vessy avatar
    1541 posts

    Posted 01 Feb Link to this post

    Hi Shirish,

    You can programmatically collapse/expand a sliding pane by calling its parent SlidingZone  collapsePane() or expandPane() methods:
    http://docs.telerik.com/devtools/aspnet-ajax/controls/splitter/client-side-programming/radslidingzone-object


    Regards,
    Vessy
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Shirish
    Shirish avatar
    11 posts
    Member since:
    Jan 2013

    Posted 01 Feb Link to this post

    Thanks Vessy. Could you please post a javascript example that will help me to understand as I didn't find any syntax for SlidingZone  collapsePane() or expandPane(). Thanks.
  4. Shirish
    Shirish avatar
    11 posts
    Member since:
    Jan 2013

    Posted 01 Feb Link to this post

    Hi Vessy,

    I tried this & it's not working :-(

    function CollapseSearch(sender, args) {                
            var slideZne = document.getElementById("Radslidingzone2");
            var spane = document.getElementById("RAD_SLIDING_PANE_TAB_Radslidingpane4");
            slideZne.collapsePane(spane.id);

        }

    Please let me know.

     

    Thanks again.

     

    Regards
    Shirish

  5. Answer
    Vessy
    Admin
    Vessy avatar
    1541 posts

    Posted 02 Feb Link to this post

    Hi Shirish,

    The suggested methods are part of the client-side API of the RadSlidingZone object, so you will need to get reference to it, instead of its html element in order to use them:
    $find("RadSlidingZone2").collapsePane("Radslidingpane4")

    I would advice that you examine the following article:
    http://docs.telerik.com/devtools/aspnet-ajax/controls/splitter/client-side-programming/overview

    Regards,
    Vessy
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  6. Shirish
    Shirish avatar
    11 posts
    Member since:
    Jan 2013

    Posted 02 Feb Link to this post

    Thanks Vessy perfect. It's working fine now. Thanks again.

    Regards
    Shirish

  7. Vessy
    Admin
    Vessy avatar
    1541 posts

    Posted 03 Feb Link to this post

    Hi,

    I am glad I managed to help, Shirish - let us know should any further questions on this matter arise.

    Regards,
    Vessy
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top