[CLOSED] Objects missing in the "theForm"-Variable
Hello,
I have a panel element with a DevExpress list. The user can work normally with it. The user can open the list in a larger size separate window, without a roundtrip to the server is necessary. But yet the user received errors from the list, when he operate with it. I've found the problem and created a small test program to show this problem.
HTML Code:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="WebApplication1._Default" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script type="text/javascript">
function maximizePanel(opanel) {
if (opanel) {
var owin = new Ext.Window({ id: opanel.id + "_max", header: false, border: false, layout: 'fit', closable: true, closeAction: 'destroy', height: 300, width: 300 });
owin.add(opanel);
owin.show();
}
}
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<ext:ResourceManager ID="RSM" runat="server" EnableViewState="true" AjaxViewStateMode="Enabled"></ext:ResourceManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Button ID="cmdAdd" OnClick="cmdAdd_Click" runat="server" Text="Request to the Server" />
</ContentTemplate>
</asp:UpdatePanel>
<ext:Button ID="cmdShow" runat="server" Icon="MagnifierZoomIn" Text="Maximize Panel">
<Listeners>
<Click Handler="maximizePanel(#{mypanel});"></Click>
</Listeners>
</ext:Button>
<div id="main">
<ext:Panel ID="mypanel" runat="server" Width="200" Height="200" Title="mypanel">
<Content>
<input id="txt" type="text" value="" />
</Content>
</ext:Panel>
</div>
</form>
</body>
</html>
Code:
Public Class _Default
Inherits System.Web.UI.Page
Protected Sub cmdAdd_Click(sender As Object, e As EventArgs)
' Action
End Sub
End Class
After pressing the button "Request to the server" an Ajax call is created. The variable "theForm.elements" contains the objects "cmdAdd" and "txt". This condition is fine. When the user presses the button "Maximize", the panel is displayed in a window object in the center of the screen. If now the button "Request to the server" is pressed, there is only the element "cmdAdd" in the variable "theForm.elements". This behavior represents my problem. Why is the field "txt" no longer in the variable? Do I have an option to change this behavior?
This behavior occurs in the Ext version 2.5.3 and 3.0.0.
I hope, you can understand my description of the problem.
Thank you in advance for your effort
@Woyciniuk