Client events

3 posts, 1 answers
  1. Steele
    Steele avatar
    96 posts
    Member since:
    Mar 2008

    Posted 01 Sep 2011 Link to this post

    I am having trouble hooking into the client events of the RadSlidingPane. Specifically :


    Basically, I want to trigger some javascript when the user collapses the sliding pane to hide the contents.
    So I have :
    <telerik:RadSlidingZone ID="rszExtraInfo" runat="server" ClickToOpen="True"
                SlideDirection="Left" SkinID="Vista">
                <telerik:RadSlidingPane ID="RadSlidingPane1" Runat="server"
                    EnableResize="False" onclientexpanding="FetchExtraInfo" Title="More Info"
                    Width="400px" onclientcollapsed="HideExtraInfo">
                    <asp:Panel ID="pnlExtraInfo" runat="server" Height="100%" Width="100%">
    With my HideExtraInfo declared as :
    function HideExtraInfo(sender) {
                        document.getElementById('<%= pnlExtraInfo.ClientID%>').style.display = 'none';

    The javascript works well enough, the issue is that the onclientcollapsed event is triggered not only when the pane is collapsed, but also when it is docked.
    Is this by design?
    I have tried to use the accessors of the sender (sliding pane) such as :
    But, no matter what, all of these values return false.
    Is there a way to achieve the outcome I am after?

    -- Edit : I am using Telerik version 2011.2.712.40
  2. Answer
    Svetlina Anati
    Svetlina Anati avatar
    2795 posts

    Posted 05 Sep 2011 Link to this post

    Hi Steele,


    I suggest to check for docking, etc with a small timeout, actually timeout of 0 also did the trick on my side:

    <script type="text/javascript">
        function HideExtraInfo(sender) {
            setTimeout(function () {
            }, 0);

    Please, text my suggestion and let me know how it goes.

    Best wishes,
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  3. Steele
    Steele avatar
    96 posts
    Member since:
    Mar 2008

    Posted 05 Sep 2011 Link to this post

    Yes - thanks, that has worked.
Back to Top