Feb 26, 2013, 6:20 PM
Panel isn't collapsing after dynamically add a fieldset
Hi all,
I'm trying to dynamically add a FieldSet with a TextField inside a Panel. After the insertion the panel can collapse, but after that it can't expand!
I'm trying to dynamically add a FieldSet with a TextField inside a Panel. After the insertion the panel can collapse, but after that it can't expand!
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<!DOCTYPE html>
<html>
<head id="Head1" runat="server">
<title>Index</title>
<script type="text/javascript">
var LoadFieldSet = function () {
App.Panel1.add(Ext.create('Ext.form.FieldSet'), {
id: 'fsPrincipal'
});
Ext.Array.include(App.fsPrincipal.items.items, Ext.create('Ext.form.field.Text', "['xtype': 'textfield', id: 'tf1', name: 'tf1' ]"));
}
</script>
</head>
<body>
<ext:ResourceManager ID="ResourceManager1" runat="server" />
<ext:Panel ID="Panel1" Margin="10" runat="server" Collapsible="True" CollapseMode="Default"
TitleCollapse="True" Collapsed="False">
<HeaderConfig Enabled="True" HideMode="Offsets" Title="teste header">
</HeaderConfig>
<Items>
<ext:Button ID="btnExec" runat="server" Text="Button1">
<Listeners>
<Click Fn="LoadFieldSet">
</Click>
</Listeners>
</ext:Button>
</Items>
</ext:Panel>
</body>
</html>
What is wrong with this code?