This is a migrated thread and some comments may be shown as answers.

Splitter in UserControl

2 Answers 81 Views
Splitter
This is a migrated thread and some comments may be shown as answers.
Martin
Top achievements
Rank 1
Martin asked on 15 Jul 2008, 10:06 AM
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 Answers, 1 is accepted

Sort by
0
Accepted
Svetlina Anati
Telerik team
answered on 15 Jul 2008, 12:01 PM
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
0
Martin
Top achievements
Rank 1
answered on 22 Jul 2008, 12:27 PM
Hi Svetlina

Sorry for the delay...

Many thanks for your response, it worked perfectly!

Regards

Martin
Tags
Splitter
Asked by
Martin
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Martin
Top achievements
Rank 1
Share this question
or