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

Cannot get simple panel bar to work

6 Answers 47 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Web Services
Top achievements
Rank 2
Web Services asked on 28 Jul 2009, 09:28 PM
I am new to the telerik controls. I have looked at a bunch of examples but I cannot seem to get my panel bar to work. It just expands everything for both items and won't collapse. I'm sure it's something simple I just don't know what. Here is my aspx page.
<%@ Master Language="VB" AutoEventWireup="false" CodeBehind="ClickableCommunity.master.vb"
    Inherits="ClickableCommunity.ClickableCommunity" %>

<%@ 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>
    <asp:ContentPlaceHolder ID="head" runat="server">
    </asp:ContentPlaceHolder>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager2" runat="server">
    </telerik:RadScriptManager>
    <div>
        <telerik:RadPanelBar ID="RadPanelBar1" runat="server" Skin="Web20" ExpandMode="SingleExpandedItem">
            <Items>
                <telerik:RadPanelItem Text="test 1" Expanded="True">
                    <ItemTemplate>
                        test<br />
                        test<br />
                    </ItemTemplate>
                </telerik:RadPanelItem>
            </Items>
            <Items>
                <telerik:RadPanelItem Text="Test 2">
                    <ItemTemplate>
                        test<br />
                        test<br />
                    </ItemTemplate>
                </telerik:RadPanelItem>
            </Items>
            <ExpandAnimation Type="InBounce" />
            <CollapseAnimation Type="InExpo" />
        </telerik:RadPanelBar>
        <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
        </asp:ContentPlaceHolder>
    </div>
    </form>
</body>
</html>

6 Answers, 1 is accepted

Sort by
0
Web Services
Top achievements
Rank 2
answered on 30 Jul 2009, 09:49 PM
Does anyone have an idea why this isn't working? I actually copied the example online verbatim and it won't work either. 
0
Paul
Telerik team
answered on 31 Jul 2009, 12:15 PM
Hi Web Services,

Here's your modified code snippet that works as expected.

<telerik:RadPanelBar ID="RadPanelBar1" runat="server" Skin="Web20" ExpandMode="SingleExpandedItem"
        <Items> 
            <telerik:RadPanelItem runat="server" Text="Test 1"
                <Items> 
                    <telerik:RadPanelItem runat="server"
                        <ItemTemplate> 
                            test<br /> 
                            test<br /> 
                        </ItemTemplate> 
                    </telerik:RadPanelItem> 
                </Items> 
            </telerik:RadPanelItem> 
            <telerik:RadPanelItem runat="server" Text="Test 2"
                <Items> 
                    <telerik:RadPanelItem runat="server"
                        <ItemTemplate> 
                            test<br /> 
                            test<br /> 
                        </ItemTemplate> 
                    </telerik:RadPanelItem> 
                </Items> 
            </telerik:RadPanelItem> 
        </Items> 
        <ExpandAnimation Type="InBounce" /> 
        <CollapseAnimation Type="InExpo" /> 
    </telerik:RadPanelBar> 


Best wishes,
Paul
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.
0
Web Services
Top achievements
Rank 2
answered on 31 Jul 2009, 01:54 PM
Ah, I knew it was something stupid. I'm sure I'll be back I have a pretty intensive site that I'm going to need a bunch of telerik controls and I really have now expirience with them, minus the videos and tutorials. Thanks,
0
Web Services
Top achievements
Rank 2
answered on 31 Jul 2009, 02:15 PM
Ok so that didn't fix it. Is it because I have a web application? I really don't know why this won't work. Here is my code. You can actually see what I'm trying to do at http://alpha.clickablecommunity.com
Make sure you don't put in a www. I haven't put in all of the a records in iis yet.

<%

@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/ClickableCommunity.Master" CodeBehind="Default.aspx.vb" Inherits="ClickableCommunity._Default" %>

 

<%

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

 

<

asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

 

</

asp:Content>

 

<

asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

 

 

<telerik:RadPanelBar ID="RadPanelBar1" Runat="server" Skin="Black">

 

 

<CollapseAnimation Type="OutCubic" Duration="100">

 

 

</CollapseAnimation>

 

 

<Items>

 

 

<telerik:RadPanelItem runat="server" Text="Root RadPanelItem1">

 

 

<Items>

 

 

<telerik:RadPanelItem runat="server" Text="Child RadPanelItem 1">

 

 

</telerik:RadPanelItem>

 

 

<telerik:RadPanelItem runat="server" Text="Child RadPanelItem 2">

 

 

</telerik:RadPanelItem>

 

 

</Items>

 

 

</telerik:RadPanelItem>

 

 

<telerik:RadPanelItem runat="server" Text="Root RadPanelItem2">

 

 

<Items>

 

 

<telerik:RadPanelItem runat="server" Text="Child RadPanelItem 1">

 

 

</telerik:RadPanelItem>

 

 

<telerik:RadPanelItem runat="server" Text="Child RadPanelItem 2">

 

 

</telerik:RadPanelItem>

 

 

</Items>

 

 

</telerik:RadPanelItem>

 

 

</Items>

 

 

<ExpandAnimation Type="None" Duration="100">

 

 

</ExpandAnimation>

 

 

</telerik:RadPanelBar>

 

</

asp:Content>

 

0
Web Services
Top achievements
Rank 2
answered on 31 Jul 2009, 02:23 PM
So I put the exact same code into another site that I have with rad controls and it worked fine. Should I just re-create the site?
0
Web Services
Top achievements
Rank 2
answered on 31 Jul 2009, 02:33 PM
Since I had just started, I just deleted all of the files and re created the site and it worked. Strange...
Tags
PanelBar
Asked by
Web Services
Top achievements
Rank 2
Answers by
Web Services
Top achievements
Rank 2
Paul
Telerik team
Share this question
or