Radpanelbar Item link opening in new window

6 posts, 0 answers
  1. App Visible
    App Visible avatar
    6 posts
    Member since:
    Mar 2009

    Posted 03 Nov 2011 Link to this post

    I am having an issue with RadPanelItem.When i click on any link the link is opening in new window instead of the target pane.The link should open the the targeted MainPane.Below is the code.Please help.Thanks in advance.

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Home.aspx.cs" Inherits="Home" %>


    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


    <html xmlns="http://www.w3.org/1999/xhtml">


    <head runat="server">
        <title></title>
        <telerik:RadCodeBlock runat="server" ID="radCodeBlock">
            <script type="text/javascript">
                function winMax() {
                    var oWnd = $find("<%=RadWindow2.ClientID %>");
                    oWnd.show();
                                  
                    oWnd.maximize();
                    //alert("done"+win);
                }
            </script>
        </telerik:RadCodeBlock>
    </head>
    <body onload="winMax()">
        <form id="form1" runat="server">
        <asp:ScriptManager ID="sc01" runat="server"></asp:ScriptManager>
        <div">
            <telerik:RadWindowManager ID="RadWindowManager1"  runat="server">
                <Windows>
                    <telerik:RadWindow ID="RadWindow2" runat="server" Title="XBROKER" Behaviors="Minimize,Close" Skin="Default"  Width="100%"   MinimizeZoneID="toolbar">
                        <ContentTemplate>
                           <telerik:RadRibbonBar ID="RadRibbonBar1" runat="server">
                                <telerik:RibbonBarTab Text="Home">
                        
                                </telerik:RibbonBarTab>
                           </telerik:RadRibbonBar>
                           <telerik:RadSplitter ID="RadSplitter1" Width="99.9%" Height="82%" runat="server"
                            ResizeMode="EndPane">
                            <telerik:RadPane ID="RadPane1" runat="server" Width="18.8%" Scrolling="Y">
                            <telerik:RadPanelBar ID="RadPanelBarMenu" runat="server" ExpandMode="FullExpandedItem"
                            Height="100%" Skin="Default" Width="100%">
                            <Items>
                                <telerik:RadPanelItem ID="asd" runat="server" Expanded="true" Height="30px" Text="Business Setup">
                                    <Items>
                                        <telerik:RadPanelItem runat="server" NavigateUrl="~/Default.aspx"
                                            Target="MainPane" Text="Agent" >
                                        </telerik:RadPanelItem>
                                        <telerik:RadPanelItem runat="server" NavigateUrl="~/BusinessSettingsSetup/BankSetup.aspx"
                                            Target="MainPane" Text="Bank">
                                        </telerik:RadPanelItem>
                                        <telerik:RadPanelItem runat="server" NavigateUrl="~/BusinessSettingsSetup/BankBranchSetup.aspx"
                                            Target="MainPane" Text="Bank Branch">
                                        </telerik:RadPanelItem>
                                        <telerik:RadPanelItem runat="server" NavigateUrl="~/BusinessSettingsSetup/BankAccountSetup.aspx"
                                            Target="MainPane" Text="Bank Accounts">
                                        </telerik:RadPanelItem>
                                        <telerik:RadPanelItem runat="server" NavigateUrl="~/BusinessSettingsSetup/BrokerHouseSetup.aspx"
                                            Target="MainPane" Text="Broker House">
                                        </telerik:RadPanelItem>
                                        <telerik:RadPanelItem runat="server" NavigateUrl="~/BusinessSettingsSetup/CompanySetup.aspx"
                                            Target="MainPane" Text="Company">
                                        </telerik:RadPanelItem>
                                        <telerik:RadPanelItem runat="server" NavigateUrl="~/BusinessSettingsSetup/CompanyBranchSetup.aspx"
                                            Target="MainPane" Text="Company Branch">
                                        </telerik:RadPanelItem>
                                        <telerik:RadPanelItem runat="server" NavigateUrl="~/BusinessSettingsSetup/InstrumentSectorSetup.aspx"
                                            Target="MainPane" Text="Instrument Sector">
                                        </telerik:RadPanelItem>
                                        <telerik:RadPanelItem runat="server" NavigateUrl="~/BusinessSettingsSetup/InstrumentIndustrySetup.aspx"
                                            Target="MainPane" Text="Instrument Industry">
                                        </telerik:RadPanelItem>
                                        <telerik:RadPanelItem runat="server" NavigateUrl="~/BusinessSettingsSetup/InstrumentMarginStatusDatewise.aspx"
                                            Target="MainPane" Text="Datewise Instrument Margin Status">
                                        </telerik:RadPanelItem>
                                        <telerik:RadPanelItem runat="server" NavigateUrl="~/BusinessSettingsSetup/InstrumentListingDatewise.aspx"
                                            Target="MainPane" Text="Datewise Instrument Listing">
                                        </telerik:RadPanelItem>
                                        <telerik:RadPanelItem runat="server" NavigateUrl="~/BusinessSettingsSetup/NonTradingDaySetup.aspx"
                                            Target="MainPane" Text="Non Trading Day">
                                        </telerik:RadPanelItem>
                                    </Items>
                                </telerik:RadPanelItem>


                            </Items>
                        </telerik:RadPanelBar>
                    </telerik:RadPane>
                    <telerik:RadSplitBar ID="RadSplitBar1" runat="server" CollapseMode="Forward" />
                    <telerik:RadPane runat="server" ID="MainPane" >


                    </telerik:RadPane>
                     </telerik:RadSplitter> 
         
                        </ContentTemplate>
                    </telerik:RadWindow>
                </Windows>
            </telerik:RadWindowManager> 
        </div>
        </form>
    </body>
    </html>


  2. Kevin
    Kevin avatar
    360 posts
    Member since:
    Jul 2012

    Posted 04 Nov 2011 Link to this post

    Hello App Visible,

    The reason your link opens in a new window is because the MainPane is not an iframe, so it won't open the url inside of it. You'll need to embed an iframe in your MainPane and set that as the target.

    I hope that helps.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 07 Nov 2011 Link to this post

    Hi John,

    You could also refer to the following forum post where you can find an example how to achieve the desired behavior.

    Greetings,
    Kate
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  5. App Visible
    App Visible avatar
    6 posts
    Member since:
    Mar 2009

    Posted 16 Nov 2011 Link to this post

    Thanks for the reply.The solution provided in the above link uses master page but i don't want to use any master page for this.Is there any possible ways to solve this without using master page.I have been using Telerik for a long time and the previous versions did not have any kind of issue like this.I'm seeing this issue in the new version only.Please help.Thanks.
  6. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 16 Nov 2011 Link to this post

    Hi John,

    Using the OnClientItemClicking event of the RadPanelBar and the event handler below you can assign different content to the right side pane of the RadSplitter control.
    <script type="text/javascript">
                function OnClientItemClicking(sender, args) {
                    var item = args.get_item();
                    if (item.get_text() == "Child RadPanelItem 3") {
                        $find("contentPane").set_contentUrl("http://www.stumbleupon.com/");                }
                    else
                        alert(1);
                }
            </script>

    I also attached my test page for reference.

    Kind regards,
    Kate
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  7. Dylan
    Dylan avatar
    17 posts
    Member since:
    Apr 2013

    Posted 07 Jun 2013 Link to this post

    Hi Kate,

    I'm facing same issue, but if I use OnClientItemClicking event it will cause the radpanelbar's parent bar not expanding after I click on the bar. The parent bar only will expand when I click on the radpanelbar arrow, not on the bar itself. How I can solve this?
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017