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

How to get RadPanelBar work in "My Portal" example?

1 Answer 70 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Wei
Top achievements
Rank 1
Wei asked on 25 Nov 2008, 05:29 PM
Hi,

I am trying to put RadPanelBar into "My Portal" example. So I opened the sample project, edited \Dock\Examples\Default\ExchangeRates.ascx as following:

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ExchangeRates.ascx.cs" 
    Inherits="Dock_Examples_Default_ExchangeRates" %> 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> 
<br /> 
Base currency:  
<br /> 
<asp:DropDownList runat="server" ID="BaseCurrencyList" EnableViewState="false" /> 
<br /> 
<br /> 
Foreign currency:  
<br /> 
<asp:DropDownList runat="server" ID="ForeignCurrencyList" EnableViewState="false" /> 
<br /> 
<br /> 
<asp:Button runat="server" ID="SubmitBtn" Text="Calculate Rate" OnClick="SubmitBtn_Click" /> 
<br /> 
<br /> 
<telerik:RadPanelBar ID="uxMenuBar" runat="server" BorderStyle="None" BorderWidth="0px" 
    EnableTheming="True" ExpandMode="FullExpandedItem" Height="200px" PersistStateInCookie="True" 
    Skin="Outlook" Width="100%" OnItemClick="uxMenuBar_ItemClick">  
    <CollapseAnimation Type="None" Duration="100"></CollapseAnimation> 
    <Items> 
        <telerik:RadPanelItem runat="server" Expanded="True" Text="Home">  
            <Items> 
                <telerik:RadPanelItem runat="server" Text="Dashboard"
                </telerik:RadPanelItem> 
                <telerik:RadPanelItem runat="server" Text="Announcements">  
                </telerik:RadPanelItem> 
                <telerik:RadPanelItem runat="server" Text="Events">  
                </telerik:RadPanelItem> 
            </Items> 
        </telerik:RadPanelItem> 
        <telerik:RadPanelItem runat="server" Text="My Inbox">  
            <Items> 
                <telerik:RadPanelItem runat="server" Text="Inbox">  
                </telerik:RadPanelItem> 
                <telerik:RadPanelItem runat="server" Text="Compose">  
                </telerik:RadPanelItem> 
                <telerik:RadPanelItem runat="server" Text="Sent Messages">  
                </telerik:RadPanelItem> 
                <telerik:RadPanelItem runat="server" Text="Recycle Bin">  
                </telerik:RadPanelItem> 
            </Items> 
        </telerik:RadPanelItem> 
    </Items> 
    <ExpandAnimation Type="None" Duration="100"></ExpandAnimation> 
</telerik:RadPanelBar> 
<asp:UpdatePanel runat="server" ID="UpdatePanelHoroscopes">  
    <ContentTemplate> 
        <asp:Literal runat="server" ID="Result" /> 
    </ContentTemplate> 
    <Triggers> 
        <asp:AsyncPostBackTrigger ControlID="SubmitBtn" /> 
    </Triggers> 
</asp:UpdatePanel> 
<br /> 
 

Then I go to design view of ExchangeRates.ascx, double click the RadPanelBar I added to the page. The added RadPanelBar in code behind will looked like this:

    protected void uxMenuBar_ItemClick(object sender, Telerik.Web.UI.RadPanelBarEventArgs e)     
    {     
        System.Diagnostics.Debug.WriteLine("You Clicked: " + e.Item.Text);     
    }    
 

Now I press F5 to debug the sample. Browse to /Dock/Examples/MyPortal/DefaultCS.aspx, then click "Add Dock" button with "Select Module" default to ExchangeRates.ascx. After the PanelBar appears, click "My Inbox" and I am expecting it to expand, but the menu refuse to expand. Refresh the page will show "My Inbox" expanded but again if you now click "Home" menu, which is collapsed at this time it won't expand like it doesn't for "My Inbox" previously.

How can I make RadPanelBar work with MyPortal sample? Did I miss something?

Thanks!

Wei

1 Answer, 1 is accepted

Sort by
0
Wei
Top achievements
Rank 1
answered on 25 Nov 2008, 07:12 PM
[Solved]

My stupid.
Just put an AJAX Manager on same page and assign both initiate and update controls to uxPannelBar will fix it.
Tags
Dock
Asked by
Wei
Top achievements
Rank 1
Answers by
Wei
Top achievements
Rank 1
Share this question
or