Bug with FullExpandedItem and PreventCollapse

2 posts, 1 answers
  1. Stephen
    Stephen avatar
    17 posts
    Member since:
    Jan 2009

    Posted 21 Apr 2009 Link to this post

    When creating items in a panel bar with the client API, the following error is generated.

    Microsoft JScript runtime error: '_getAnimationContainer().style' is null or not an object

    This happens only when ExpandMode="FullExpandedItem" and PreventCollapse="true".


    Sample code follows:

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Toolbar._Default" %>
    <%@ 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 refresh() {
                var panel = $find("Panel1").findItemByValue("ITEM");
                var items = panel.get_items();
                items.clear();
                var item = new Telerik.Web.UI.RadPanelItem();
                item.set_text("Item");
                items.add(item);
                panel.expand();
            }
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
        <telerik:RadScriptManager runat="server"></telerik:RadScriptManager>
        <input type="button" value="Click Me Several Times" onclick="refresh();" />
        <telerik:RadPanelBar ID="Panel1" Runat="server" ExpandMode="FullExpandedItem">
            <Items>
                <telerik:RadPanelItem Text="Item0" Value="ITEM" PreventCollapse="true"></telerik:RadPanelItem>
            </Items>
        </telerik:RadPanelBar>
        </form>
    </body>
    </html>

     

    I am using 2009 Q1.

  2. Answer
    Paul
    Admin
    Paul avatar
    4281 posts

    Posted 21 Apr 2009 Link to this post

    Hello Stephen,

    Actually, we admit it's a bug in the control and we'll do our best to fix it for SP2. Meanwhile, a better workaround would be to use panelbar in SingleExpandedItem mode or prevent the collapsing with JS.

    All the best,
    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.
Back to Top