How to Open right pane page by selecting the left panel link

6 posts, 0 answers
  1. nazeer
    nazeer avatar
    27 posts
    Member since:
    May 2009

    Posted 01 Jun 2012 Link to this post

    Hi Telerik Team,

    I hav a Radsplitter declared below


    <telerik:RadSplitter ID="RadSplitter" runat="server" Height="100%" Width="100%" OnClientLoad="SplitterLoad" VisibleDuringInit="false" ResizeWithBrowserWindow="true">
      
        <telerik:RadPane ID="RadLeftMenuPane" runat="server" Width="22px" BackColor="#efefef" Scrolling="None"
      
    <telerik:RadSlidingZone ID="RadLeftMenuSlide" runat="server" Width="22" DockedPaneId="RadConfigurationMenu" 
      
     BackColor="#0b497b" SlideDirection="right"
      
     <telerik:RadSlidingPane ID="RadCommonLeftMenu" runat="server" Title="Menu" CssClass="RadSlidingPane" Overlay="true"
      
     </telerik:RadSlidingPane
      
    </telerik:RadSlidingZone>
    </telerik:RadPane>
      
    <telerik:RadPane ID="RadMiddlePane1" runat="server" Scrolling="None" Width="100%" Height="100%">
      
    <telerik:RadSplitter ID="Radsplitter2" runat="server" Orientation="Horizontal" VisibleDuringInit="false">
      
    <telerik:RadPane ID="Radpane2" runat="server">
      
    <div id="pagecontent" class="PageContent" style="height: 100%">
      
    <iframe frameborder="0" runat="server" width="100%" id="Frame" src="LandingPage.aspx">
      
    </iframe
      
    </div>
      
    </telerik:RadPane>
      
    </telerik:RadSplitter>
      
    </telerik:RadPane>
      
    </telerik:RadSplitter>


    In pageload i am loading RadLeftMenuSlide

     

    Protected void Page_Load(object sender,EventArgs e)
    {
    LoadUserControl();
    }
      
    private void LoadUserControl()
      
    {
      
    _leftNav = (LeftNavigation)LoadControl(_topPath + LEFT_NAV_FILE_PATH);
      
    _leftNav.ParentMenuItem = Module;
      
    RadCommonLeftMenu.Controls.Add(leftNav);
      
    RadCommonLeftMenu.Visible = true;
      
    }

    in the LeftNavigation usercontrol i hav one link button called "LeftlinkbuttonwithParameters".  if i click on "LeftlinkbuttonwithParameters" link button im redirecting to Landingpage.aspx

     

    "javascript:Redirect('" + Request.ApplicationPath + "Landingpage.aspx');"

    Now if i click on LandingPage.aspx page i am loading iframe

    now in iFrame(LandingPage.aspx) i have button called btnEnablewithParameters

    if i click on the btnEnablewithParameters button i am having having Mode="Edit",
     my Left slidingpane RadLeftMenuSlide is loading and i am enabling "LeftlinkbuttonwithParameters" link button

    Now if i click on "LeftlinkbuttonwithParameters" link button i should redirect to LandingPage.aspx with Parameter "javascript:Redirect('" + Request.ApplicationPath + "Landingpage.aspx&Mode=' + "Edit");"


    Please let me know if you need more clarification regarding above query

    Thank you
    Shaik Nazeer Hussain.

  2. Peter
    Peter avatar
    12 posts
    Member since:
    Nov 2008

    Posted 02 Jun 2012 Link to this post

    Hi Nazeer,
    I've a similiar situation where I load a treeview in left panel and load content to the right panel on node click event.
    Something like this
    <telerik:RadSplitter ID="RadSplitter1" runat="server" Width="100%" Height="100%"
        ResizeMode="AdjacentPane" BorderStyle="None"
        LiveResize="True" ResizeWithParentPane="False" >
        <telerik:RadPane ID="RadPane1" runat="server" Width="240px">
             <telerik:RadTreeView ID="RadTreeView1" runat="server" OnNodeExpand="RadTreeView1_NodeExpand"
                OnNodeClick="RadTreeView1_NodeClick" Skin="Telerik"
                 oncontextmenuitemclick="RadTreeView1_ContextMenuItemClick" >
                 <ContextMenus>
                     <telerik:RadTreeViewContextMenu ID="ClientContextMenu" runat="server">
                         <Items>
                             <telerik:RadMenuItem Value="NewClient" Text="New Client" ImageUrl="Images/client.gif">
                             </telerik:RadMenuItem>
                             <telerik:RadMenuItem IsSeparator="true">
                             </telerik:RadMenuItem>
                             <telerik:RadMenuItem Value="DeleteClient" Text="Delete Client" ImageUrl="Images/delete.gif">
                             </telerik:RadMenuItem>
                         </Items>
                         <CollapseAnimation Type="none" />
                     </telerik:RadTreeViewContextMenu>
                 </ContextMenus>
             </telerik:RadTreeView>
        </telerik:RadPane>
        <telerik:RadSplitBar ID="RadSplitbar1" runat="server" CollapseMode="Forward">
        </telerik:RadSplitBar>
        <telerik:RadPane ID="RadPane2" runat="server" ContentUrl="about:blank">
        </telerik:RadPane>
    </telerik:RadSplitter>

    And on the node click event I do the following . You basically asign the RadPane ContentUrl parameter.

    protected void RadTreeView1_NodeClick(object sender, RadTreeNodeEventArgs e)
    {
        string[] vals = e.Node.Value.Split('_');
        string n_type = vals[0];
        string n_value = vals[1];
     
        if (n_type == "CID")
        {
            RadPane2.ContentUrl = "~/FileStorage/Pages/ClientMnt.aspx?Type=tree&ClientId=" + n_value;
        }
        else
        {
            RadPane2.ContentUrl = "about:blank";
        }
     
     }

    Good luck
    Peter
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. nazeer
    nazeer avatar
    27 posts
    Member since:
    May 2009

    Posted 04 Jun 2012 Link to this post

    Hi Peter,

    Thanks for your quick update.
    My Scenario is different, i want to access hidden field(hdnTest value) from left Menu pane (i.e OnClientClick="Test1();")

    Below is my Syntax

     

    <telerik:RadSplitter ID="RadSplitter" runat="server" Height="100%" Width="100%" OnClientLoad="SplitterLoad"
                        VisibleDuringInit="false" ResizeWithBrowserWindow="true" CssClass="LeftMenuPaneCss">
                        <telerik:RadPane ID="RadLeftMenuPane" runat="server" Width="22px" BackColor="#efefef"
                            Scrolling="None">
                            <telerik:RadSlidingZone ID="RadLeftMenuSlide" runat="server" Width="22" DockedPaneId="RadConfigurationMenu"
                                BackColor="#0b497b" SlideDirection="right">
                                <telerik:RadSlidingPane ID="RadSlidingPane1" runat="server" Title="Test" CssClass="RadSlidingPane"
                                    Overlay="true">
                                    <asp:Button runat="server" Text="Test" ID="btnTest" OnClientClick="Test1();" />
                                </telerik:RadSlidingPane>
                            </telerik:RadSlidingZone>
                        </telerik:RadPane>
                        <telerik:RadPane ID="RadMiddlePane1" runat="server" Scrolling="None" Width="100%"
                            Height="100%">
                            <telerik:RadSplitter ID="Radsplitter2" runat="server" Orientation="Horizontal" VisibleDuringInit="false">
                                <telerik:RadPane ID="Radpane2" runat="server">
                                    <div id="pagecontent" class="PageContent" style="height: 100%">
                                        <iframe frameborder="0" runat="server" width="100%" id="Frame" src="../LandingPage.aspx">
                                            <asp:HiddenField runat="server" ID="hdnTest" Value="1" />
                                        </iframe>
                                    </div>
                                </telerik:RadPane>
                            </telerik:RadSplitter>
                        </telerik:RadPane>
                    </telerik:RadSplitter>


    At present i can able to get the RadMiddlePane1 object

     

    function Test1() {
                var targetPane = $find("RadSplitter").getPaneById("RadMiddlePane1");
      
                  }

    Now i want the hdnTest value when clicking of the btnTest button.

    Please let me know if you need further info.

    Thank you
    Shaik Nazeer Hussain
  5. nazeer
    nazeer avatar
    27 posts
    Member since:
    May 2009

    Posted 17 Jun 2012 Link to this post

    Hi TelerikTeam,

    Any Updates on my above query?

    ThankYou
    Shaik Nazeer Hussain
  6. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 19 Jun 2012 Link to this post

    Hi Shaik,

    The following markup is incorrect:
    <iframe frameborder="0" runat="server" width="100%" id="Frame" src="../LandingPage.aspx">
        <asp:HiddenField runat="server" ID="hdnTest" Value="1" />
    </iframe>

    It is not correct to nest additional elements inside an <iframe> - the hidden field might be rendered on the page but it is not part of the DOM and it cannot me accessed. If the asp:HiddenField is not nested inside the <iframe> you can get reference to its DOM object using the $get() method, e.g.:
    function Test1(){
        alert($get("<%= hdnTest.ClientID %>").value);
    }


    Kind regards,
    Dobromir
    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. Martin Roussel
    Martin Roussel avatar
    246 posts
    Member since:
    Jan 2010

    Posted 18 Jul 2012 Link to this post

    You can look at the snippets ive put into the last reply of this post, it might help you: Post
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017