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

Collapse SlidingZone inside an update panel.

1 Answer 89 Views
Splitter
This is a migrated thread and some comments may be shown as answers.
Kyle
Top achievements
Rank 1
Kyle asked on 24 Apr 2008, 12:15 PM
Hello,

I have an iframe surronded by an update panel.  In my iframe i load, there is a SlidingZone that I use ExpandedPanelID to expand the one RadPane I have inside the sliding zone.  Inside the Pane is a Tree and when a user clicks on a node in the tree I want the slidingzone to close.  I've seen solutions to this but they all utilize javascript like so:

 var slidingZone = $find("<%= SlidingZone1.ClientID %>");
         slidingZone.UndockPane(paneid);

I can't use the "$find("<%= SlidingZone1.ClientID %>")" inside an updatepanel.  Is there another way to close a slidingzone either with javascript or code behind?

thank you.

1 Answer, 1 is accepted

Sort by
0
Tsvetie
Telerik team
answered on 29 Apr 2008, 08:15 AM
Hi Kyle,
I am not quite sure why you cannot use the code with an UpdatePanel. In case you get the "The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>). " error, you can wrap the code in a RadCodeBlock:
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">  
<script type="text/javascript">  
function Test()  
{  
    var slidingZone = $find("<%= SlidingZone1.ClientID %>");   
}  
</script>  
</telerik:RadCodeBlock> 

In case you do not want to use that approach, you can clear the DockedPaneId property of the RadSlidingZone on the server:
<telerik:RadSplitter ID="RadSplitter1" runat="server">  
    <telerik:RadPane ID="RadPane1" runat="server" Width="22px" Scrolling="None">  
        <telerik:RadSlidingZone ID="RadSlidingZone1" runat="server">  
            <telerik:RadSlidingPane ID="RadSlidingPane1" runat="server" Title="Aaa"></telerik:RadSlidingPane> 
        </telerik:RadSlidingZone> 
    </telerik:RadPane> 
    <telerik:RadPane ID="RadPane2" runat="server">  
    </telerik:RadPane> 
</telerik:RadSplitter> 
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" /> 

protected void Button1_Click(object sender, EventArgs e)  
{  
    this.RadSlidingZone1.DockedPaneId = string.Empty;  

Kind regards,
Tsvetie
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Splitter
Asked by
Kyle
Top achievements
Rank 1
Answers by
Tsvetie
Telerik team
Share this question
or