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

Content url of radpane

2 Answers 299 Views
Splitter
This is a migrated thread and some comments may be shown as answers.
harika dasari
Top achievements
Rank 1
harika dasari asked on 22 Mar 2010, 07:45 AM
Hi Telerik,

      I have serious problem.......
I have used to RadPanes one as header and the other as main pane in which the content gets displayed.
i have a user control which shows some tabs,this is placed in the header radpane.
Now on clicking the tabs i need to change the content url of the main content in order to load a different page in it.
i'am using javascript to get the to get the element id of the pane from the main rad pane in the click event of the tabs of the user control.
but ia'm unable to change the url of the content pane

In user control
the script used to get the contentpane id is

 

function GetId()

 

{

 

var splitterPageWnd = window.parent;

 

 

var splitterObject = splitterPageWnd.GetRadSplitter();

 

splitterObject.SetcontentUrl=(

"http://www.google.com");

 

}


i'am calling this on the click event of tab.....


This is the code i have written in the maincontent pane to get the id of the pane

 

function GetRadSplitter ()

 

{

 

return document.getElementById("RadContentPane");

 

 

}



i'am getting the id but not able to load the content with the page required.....................



plz help me on this .............................asap...............plzzz

Thanks in Advance
Pushpa.

2 Answers, 1 is accepted

Sort by
0
Dobromir
Telerik team
answered on 24 Mar 2010, 05:56 PM
Hi Pushpa,

In the provided sample code I noticed that you are trying to use a DOM element as a client object. In order to get a reference to the RadPane control you have to use the following code:
var contentPane = $find("<%=RadContentPane.ClientID%>");

Also, the method that sets the contentUrl property of RadPane is set_contentUrl().

Please check the following articles for more information about the Client-Side API of RadSplitter:
RadSplitter Client-Side Basics
RadPane Client Object

Here is an example how to set the content url of a RadPane:
<telerik:RadSplitter ID="RaDSpliter1" runat="server" Orientation="Horizontal" Width="100%"
    Height="800">
    <telerik:RadPane ID="RadPane1" runat="server" Height="200">
        <asp:Button ID="GoogleButton" Text="Open Google" runat="server" OnClientClick="setUrl('http://www.google.com'); return false;" />
        <asp:Button ID="MSDNBUtton" Text="Open MSDN" runat="server" OnClientClick="setUrl('http://www.msdn.com'); return false;" />
    </telerik:RadPane>
    <telerik:RadPane ID="RadPane2" runat="server"></telerik:RadPane>
</telerik:RadSplitter>
 
<script type="text/javascript">
    function setUrl(url)
    {
        var contentPane = $find("<%=RadPane2.ClientID%>");
        contentPane.set_contentUrl(url);
    }
</script>

I hope this helps.

Best wishes,
Dobromir
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
RAGHUNATH
Top achievements
Rank 1
answered on 13 Aug 2012, 02:35 PM
Hi Telerik team,
I'm setting RadPane's ContentUrl in aspx.cs, but it is not working. Can you please help?
Version for telerik.Web.UI.dll --> 2010.2.929.20

Sunny G
Tags
Splitter
Asked by
harika dasari
Top achievements
Rank 1
Answers by
Dobromir
Telerik team
RAGHUNATH
Top achievements
Rank 1
Share this question
or