PDA

View Full Version : [CLOSED] Ext.net v2 Beta release: If window Hidden parameter is true, Show method don´t show window.



supera
Mar 16, 2012, 7:44 PM
Hi!

If the Hidden parameter of window is true, the 'Show' method don´t show the window.
In DP1, this works...
If I set the Hidden parameter to false, the window appears when the page is loaded... How is the correct way to declare a ext:window in Beta release?



<%@ Page Language="vb" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">
Protected Sub OpenWindow(sender As Object, evt As Ext.Net.DirectEventArgs)
wndWindow.show()
End Sub
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<ext:ResourceManager ID="ResourceManager1" runat="server" Locale="pt-BR" />
<form id="form1" runat="server">
<ext:Viewport ID="Viewport1" runat="server">
<Items>
<ext:Button runat="server" id="btnOpenWindow" Text="Open window" OnDirectClick="OpenWindow" />
</Items>
</ext:Viewport>
<ext:Window
ID="wndWindow"
runat="server"
Icon="BookEdit"
Title="Agendamento"
Width="520"
Height="440"
AutoShow="false"
Modal="true"
Resizable="false"
Hidden="true"
ButtonAlign="Right"
Layout="FitLayout"
DefaultButton="button[text=Ok]">
<Items>
<ext:Panel ID="paneAgendamentosSalaSGE" runat="server" Border="true" BodyPadding="3" Layout="AbsoluteLayout">
<Defaults>
<ext:Parameter Name="LabelAlign" Value="top" Mode="Value" />
</Defaults>
<Items>
<ext:TextField runat="server" ID="txtDescricao" Disabled="true" FieldLabel="Descriçăo" X="10" Y="0" Width="490px" MaxLength="100"/>
</Items>
</ext:Panel>
</Items>
<Buttons>
<ext:Button runat="server" id="btnOk" text="Ok" Width="80px" Icon="Tick" />
<ext:Button runat="server" id="btnCancel" text="Cancelar" Width="80px" Icon="Cancel" />
</Buttons>
</ext:Window>
</form>
</body>
</html>

Daniil
Mar 16, 2012, 7:56 PM
Hi,

Thanks for the report! We are investigating.

Here is the sample to reproduce.

Example

<%@ Page Language="C#" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

<!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>Ext.NET v2 Example</title>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />
<ext:Window ID="Window1" runat="server" Hidden="true" />
<ext:Button runat="server" Text="Show">
<Listeners>
<Click Handler="App.Window1.show();" />
</Listeners>
</ext:Button>
</form>
</body>
</html>

Vladimir
Mar 16, 2012, 9:54 PM
Hi,

Fixed in SVN. Please update

supera
Mar 19, 2012, 1:35 PM
Hi Vladimir

Works fine!

Thanks a lot.