Jan 30, 2012, 9:34 PM
[CLOSED] Dynamic Fields and Collapsed Panel
Hi,
I'm trying to get a value of a dynamic field from a collapsed formgroup panel. The code below works only when a formgroup panel has been expanded prior to clicking on the "get" button
I'm trying to get a value of a dynamic field from a collapsed formgroup panel. The code below works only when a formgroup panel has been expanded prior to clicking on the "get" button
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<script runat="server">
protected void AddItem(object sender, DirectEventArgs e)
{
var txtbx = new TextField { ID = "a1", Text = "test" };
txtbx.AddTo(pDynamic);
}
protected void GetItem(object sender, DirectEventArgs e)
{
lbl.Text = Request["a1"].ToString();
}
</script>
<!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 id="Head1" runat="server">
<title></title>
</head>
<body>
<form runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" />
<ext:Panel ID="pDynamic" runat="server" FormGroup="true" Collapsed="true" Title="Dynamic Panel" />
<ext:Label runat="server" ID="lbl" />
<ext:Button ID="add" runat="server" Text="add">
<DirectEvents>
<Click OnEvent="AddItem" />
</DirectEvents>
</ext:Button>
<ext:Button ID="get" runat="server" Text="get">
<DirectEvents>
<Click OnEvent="GetItem" />
</DirectEvents>
</ext:Button>
</form>
</body>
</html>
Is there any way to get a1.Text with the panel collapsed=true and without opening the panel first?
Last edited by Daniil; Jan 31, 2012 at 2:12 PM.
Reason: [CLOSED]