Getting RadPane2 to see dcom in radpane1

2 posts, 0 answers
  1. Bruce St.Clair
    Bruce St.Clair avatar
    27 posts
    Member since:
    Jan 2008

    Posted 11 Jun 2009 Link to this post

    I have a simple setup with a div of a single toolbar in top div.  THe second div contains spitter,2 panes, splitterbar.
    Pane 1 contains PanelBar which when clicked sets the contenturl for pane2.  What I want to know if I make a change in the pane2 url is there a way to get to the dcom in the head div from the main page.  IE if content is edited in pane2 I wish to enable the save button in the toolbat in div 1 of the main page.

    Main.aspx


    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Main.aspx.cs" Inherits="AudWeb.Main" %> 
     
    <%@ 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>  
        <script type="text/javascript">  
          
          function pageLoad() {  
          }  
          
        </script> 
        <style type="text/css">  
        html, body, form       
        {       
        height: 100%;   
        padding: 0px;  
        margin: 0px;      
            
        }  
        </style> 
    </head> 
    <body> 
        <form id="form1" runat="server">  
            <telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
            </telerik:RadScriptManager> 
            <div style="height:5%;">  
     
            <telerik:RadToolBar ID="RadToolBar1" runat="server" Skin="Vista" Width="100%">  
                <Items> 
                    <telerik:RadToolBarButton runat="server" Text="Button 0">  
                    </telerik:RadToolBarButton> 
                    <telerik:RadToolBarButton runat="server" Text="Button 1">  
                    </telerik:RadToolBarButton> 
                    <telerik:RadToolBarButton runat="server" Text="Button 2">  
                    </telerik:RadToolBarButton> 
                    <telerik:RadToolBarButton runat="server" Text="Button 3">  
                    </telerik:RadToolBarButton> 
                    <telerik:RadToolBarButton runat="server" Text="Button 4">  
                    </telerik:RadToolBarButton> 
                    <telerik:RadToolBarButton runat="server" Text="Button 5">  
                    </telerik:RadToolBarButton> 
                </Items> 
            </telerik:RadToolBar> 
        </div> 
        <div id="ParentDivElement" style="height:95%;">  
            <telerik:RadSplitter ID="RadSplitter1" runat="server" LiveResize="True"   
                Height="100%" Width="100%">  
     
            <telerik:RadPane ID="RadPane1" runat="server"   
                    MinHeight="0" MinWidth="200" MaxWidth="200" Width="200px">  
                <telerik:RadPanelBar ID="RadPanelBar1" Runat="server"   
                    onitemclick="RadPanelBar1_ItemClick" Width="200px" Skin="Vista">  
                    <Items> 
                        <telerik:RadPanelItem runat="server" Text="Client" Value ="1">  
                        </telerik:RadPanelItem> 
                        <telerik:RadPanelItem runat="server" Text="Appointments" Value ="2">  
                        </telerik:RadPanelItem> 
                        <telerik:RadPanelItem runat="server" Text="Visits" Value ="3">  
                        </telerik:RadPanelItem> 
                        <telerik:RadPanelItem runat="server" Text="Hearing Aids" Value ="4">  
                        </telerik:RadPanelItem> 
                    </Items> 
                </telerik:RadPanelBar> 
            </telerik:RadPane> 
            <telerik:RadSplitBar ID="RadSplitBar1" runat="server" CollapseMode="Forward" /> 
            <telerik:RadPane ID="RadPane2" runat="server" ContentUrl="http://www.google.com">  
            </telerik:RadPane> 
                    </telerik:RadSplitter> 
        </div> 
        </form> 
    </body> 
    </html> 
     

    Code Behind

    using System;  
    using System.Collections.Generic;  
    using System.Linq;  
    using System.Web;  
    using System.Web.UI;  
    using System.Web.UI.WebControls;  
    using Telerik.Web.UI;  
     
    namespace AudWeb  
    {  
        public partial class Main : System.Web.UI.Page  
        {  
            protected void Page_Load(object sender, EventArgs e)  
            {  
     
            }  
     
            protected void RadPanelBar1_ItemClick(object sender, Telerik.Web.UI.RadPanelBarEventArgs e)  
            {  
     
                RadPanelItem Itemclicked = e.Item;  
                string name = Itemclicked.Value;  
                int n = int.Parse(name);  
     
     
                switch (n)  
                {  
                    case 1:  
                        RadPane2.ContentUrl = @"~\Client.aspx";  
                        break;  
                    case 2:  
                        RadPane2.ContentUrl = @"~\Appointment.aspx";  
                        break;  
                    case 3:  
                        RadPane2.ContentUrl = @"~\Visit.aspx";  
                        break;  
                    case 4:  
                        RadPane2.ContentUrl = @"~\HA.aspx";  
                        break;  
                       
     
                }  
                   
     
                //RadPane2.ContentUrl = @"~\" + Itemclicked.Text + ".html";  
            }  
        }  
    }  
     


    Thanks for any help.  Would it be better to use a master page?  I am trying to make it flicker free as possible.
  2. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 15 Jun 2009 Link to this post

    Hello Bruce,

    I am not completely sure what is the exact problem you experience and what is your exact goal. In case you want to access some control which is in an external page loaded in a RadPane, you can do this by using AJAX (this will also avoid any flickering) as explained in the article below:

    http://www.telerik.com/support/kb/aspnet-ajax/splitter/use-ajax-request-to-update-part-of-an-external-page-loaded-in-a-radpane.aspx

    In case this is not what you want or you need further assistance, please open a new support ticket and send me a sample, fully runnable reproduction demo along with detailed explanations of the actual and the desired behavior and I will do my best to help.


    All the best,
    Svetlina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top