Splitter in UserControl

3 posts, 1 answers
  1. Martin
    Martin avatar
    41 posts
    Member since:
    Sep 2013

    Posted 15 Jul 2008 Link to this post

    Hi

    I am using a radSplitter inside a UserControl
    and I have a HTML button within this control which is used to CLOSE a Sliding pane

    However the Javascript needs to find the RadSlidingZone inside the UserControl
    Is there any way to do this? (I'm not a Javascript expert!)

    Normally I would put the Java function after the BODY page element as follows
    BUT this produces an compilation error because the Splitter is inside a userControl

    <body>
    <script type="text/javascript">
    function ClosePane_SignIn()
    {
     var slidingZone = $find("<%= RadSlidingZone1.ClientID %>");
     slidingZone.collapsePane("RadSlidingPaneSignIn");
    }

    Any help appreciated...

    Regards

    Martin
  2. Answer
    Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 15 Jul 2008 Link to this post

    Hi Martin,

    In order to achieve the desired behavior you can define the function in your user control. After that you can call it from the main page, without problems, because it will be already outputted on the main page.

    Please also note that the User Control is an INaming Container and it changes the controls' IDs. This means that is you use the slidingZone.collapsePane("RadSlidingPaneSignIn") the RadSlidingPane will not be found. You should modify the code in this manner: slidingZone.collapsePane("<%=RadSlidingPaneSignIn.ClientID%>").

    All the best,
    Svetlina
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Martin
    Martin avatar
    41 posts
    Member since:
    Sep 2013

    Posted 22 Jul 2008 Link to this post

    Hi Svetlina

    Sorry for the delay...

    Many thanks for your response, it worked perfectly!

    Regards

    Martin
Back to Top