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

Multipage RadPanelBar in master

2 Answers 68 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Mona
Top achievements
Rank 1
Mona asked on 29 Sep 2008, 11:41 AM
hi
Iam trying to use panel bar in master page like your example:
http://demos.telerik.com/aspnet/prometheus/Panelbar/Examples/ApplicationScenarios/OutlookNavigation/DefaultCS.aspx
it works fine in aspx but it didn't work when use it in master page
Regards ;

2 Answers, 1 is accepted

Sort by
0
Paul
Telerik team
answered on 02 Oct 2008, 02:19 PM
Hello Mona ,

Please find below a slightly modified version of the code that works fine on a masterpage.

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %> 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> 
<!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>Untitled Page</title> 
    <link rel="stylesheet" href="styles.css" type="text/css" /> 
</head> 
<body> 
    <form id="form1" runat="server">  
        <div> 
 
            <script type="text/javascript">  
            var blnDragging = false;  
            function OnClientItemClicking(sender, eventArgs)  
            {  
                var multipage=$find('<%= RadMultiPage1.ClientID %>');  
                multipage.set_selectedIndex(eventArgs.get_item().get_index());  
            }  
            function BeforeDragHandler()  
            {  
                blnDragging = true;  
            }  
              
            function BeforeDropHandler()  
            {  
                blnDragging = false;      
            }     
            </script> 
 
            <script type="text/javascript">  
            function panelMouseOver(sender, eventArgs)  
            {  
                if (eventArgs.get_item().get_text().indexOf("Folders") != -1 && blnDragging)  
                {  
                    var multipage=$find('<%= RadMultiPage1.ClientID %>');  
                    multipage.set_selectedIndex(eventArgs.get_item().get_index());  
                }  
            }  
            </script> 
 
            <telerik:RadScriptManager ID="ScriptManager" runat="server" /> 
            <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0" Height="240px" Width="198px" BackColor="White" BorderColor="#6593cf" BorderStyle="Solid" BorderWidth="1px">  
                <telerik:RadPageView ID="RadPageView1" runat="server">  
                    <div class="qsfexHeader">  
                        Favourite Folders</div> 
                    <telerik:RadTreeView ID="RadTreeView1" runat="server" EnableDragAndDrop="true" OnClientNodeDragStart="BeforeDragHandler" OnClientNodeDropping="BeforeDropHandler" MultipleSelect="True" OnNodeDrop="TreeDrop" Skin="Office2007" Height="213px" OnLoad="OnTreeLoad">  
                    </telerik:RadTreeView> 
                </telerik:RadPageView> 
                <telerik:RadPageView ID="RadPageView2" runat="server">  
                    <div class="qsfexHeader">  
                        All Mail Folders</div> 
                    <telerik:RadTreeView ID="RadTreeView2" runat="server" EnableDragAndDrop="true" OnClientNodeDragStart="BeforeDragHandler" OnClientNodeDropping="BeforeDropHandler" MultipleSelect="True" OnNodeDrop="TreeDrop" Skin="Office2007" Height="213px" OnLoad="OnTreeLoad">  
                    </telerik:RadTreeView> 
                </telerik:RadPageView> 
                <telerik:RadPageView ID="RadPageView3" runat="server">  
                    <div class="qsfexHeader">  
                        Calendar</div> 
                    <telerik:RadCalendar ID="RadCalendar2" runat="server" DayNameFormat="FirstLetter" Style="margin: 5px auto;" Skin="Office2007">  
                    </telerik:RadCalendar> 
                </telerik:RadPageView> 
                <telerik:RadPageView ID="RadPageView4" runat="server">  
                    <div class="qsfexHeader">  
                        Others</div> 
                    <ul class="qsfexOtherItems">  
                        <li><span class="qsfexLinkImage">  
                            <asp:Image ID="Image1" runat="server" ImageUrl="Img/contactsItems.gif" AlternateText="My Contacts" /></span><asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="#">My Contacts</asp:HyperLink></li>  
                        <li><span class="qsfexLinkImage">  
                            <asp:Image ID="Image2" runat="server" ImageUrl="Img/tasksItems.gif" AlternateText="Tasks" /></span><asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl="#">Tasks</asp:HyperLink></li>  
                        <li><span class="qsfexLinkImage">  
                            <asp:Image ID="Image3" runat="server" ImageUrl="Img/notesItems.gif" AlternateText="Notes" /></span><asp:HyperLink ID="HyperLink3" runat="server" NavigateUrl="#">Notes</asp:HyperLink></li>  
                    </ul> 
                </telerik:RadPageView> 
            </telerik:RadMultiPage> 
            <telerik:RadPanelBar ID="RadPanelbar1" runat="server" ExpandMode="SingleExpandedItem" OnClientItemClicking="OnClientItemClicking" OnClientMouseOver="panelMouseOver" Skin="Office2007" Width="200px">  
                <Items> 
                    <telerik:RadPanelItem Text="Favourite Folders" Expanded="True" ImageUrl="Img/mail.gif">  
                    </telerik:RadPanelItem> 
                    <telerik:RadPanelItem Text="All Mail Folders" ImageUrl="Img/mail.gif">  
                    </telerik:RadPanelItem> 
                    <telerik:RadPanelItem Text="Calendar" ImageUrl="Img/calendar.gif">  
                    </telerik:RadPanelItem> 
                    <telerik:RadPanelItem Text="Others" ImageUrl="Img/contacts.gif">  
                    </telerik:RadPanelItem> 
                </Items> 
            </telerik:RadPanelBar> 
        </div> 
        <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">  
        </asp:ContentPlaceHolder> 
    </form> 
</body> 
</html> 
 


Best wishes,
Paul
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Mona
Top achievements
Rank 1
answered on 02 Oct 2008, 07:42 PM
many thanks. now it works great
Tags
PanelBar
Asked by
Mona
Top achievements
Rank 1
Answers by
Paul
Telerik team
Mona
Top achievements
Rank 1
Share this question
or