This is a migrated thread and some comments may be shown as answers.
Bug with FullExpandedItem and PreventCollapse
1 Answer 29 Views
This is a migrated thread and some comments may be shown as answers.
Stephen
Top achievements
Rank 2
Stephen asked on 21 Apr 2009, 05:43 AM

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.

1 Answer, 1 is accepted

Sort by
0
Accepted
Paul
Telerik team
answered on 21 Apr 2009, 02:28 PM
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.
Asked by
Stephen
Top achievements
Rank 2
Answers by
Paul
Telerik team
Share this question
or