Cannot get simple panel bar to work

7 posts, 0 answers
  1. Web Services
    Web Services avatar
    243 posts
    Member since:
    Apr 2008

    Posted 28 Jul 2009 Link to this post

    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>

  2. Web Services
    Web Services avatar
    243 posts
    Member since:
    Apr 2008

    Posted 30 Jul 2009 Link to this post

    Does anyone have an idea why this isn't working? I actually copied the example online verbatim and it won't work either. 
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Paul
    Admin
    Paul avatar
    4281 posts

    Posted 31 Jul 2009 Link to this post

    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.
  5. Web Services
    Web Services avatar
    243 posts
    Member since:
    Apr 2008

    Posted 31 Jul 2009 Link to this post

    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,
  6. Web Services
    Web Services avatar
    243 posts
    Member since:
    Apr 2008

    Posted 31 Jul 2009 Link to this post

    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>

     

  7. Web Services
    Web Services avatar
    243 posts
    Member since:
    Apr 2008

    Posted 31 Jul 2009 Link to this post

    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?
  8. Web Services
    Web Services avatar
    243 posts
    Member since:
    Apr 2008

    Posted 31 Jul 2009 Link to this post

    Since I had just started, I just deleted all of the files and re created the site and it worked. Strange...
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017