PDA

View Full Version : Show window with Visible="False"



atroul
Oct 17, 2017, 11:51 AM
How I can show a window when it has Visible="false"?


<ext:Window ID="WndwLinkDoc" runat="server"
Width="650" Height="350" CloseAction="Hide"
X="120" Y="120" Visible="false" Title="Link doc"
ConstrainHeader="true"
Layout="FitLayout">


I tried with
WndwLinkDoc.Show() but its not working.

If I use Hidden="true" I have problem accessing this:

<ext:Hidden runat="server" ID="hdnclid" />
In store in the window by passing its value to Parameter:


<ExtraParams>
<ext:Parameter Name="clientid" Value="#{hdnclid}.value" Mode="Raw"/> //error hdnclid undefined
</ExtraParams>


Full window code:


<ext:Hidden runat="server" ID="hdnclid" />
<ext:Window ID="WndwLinkDoc" runat="server"
Width="650" Height="350" CloseAction="Hide"
X="120" Y="120" Visible="false" Title="Link doc"
ConstrainHeader="true"
Layout="FitLayout">
<Items>
<ext:ComboBox ID="CmbFindDoc" runat="server"
DisplayField="FullName"
ValueField="id"
TypeAhead="true"
FieldLabel="Doctor"
Width="470" MaxLength="150"
PageSize="10" AllowBlank="false"
LabelWidth="130" ForceSelection="true"
HideTrigger="false"
MinChars="0"
TriggerAction="Query">
<ListConfig ID="lstc" LoadingText="Searching...">
<ItemTpl runat="server">
<Html>
<div class="search-item">
<h3>{DocTitle} {FullName}</h3>
{Speciality1}, {Address} - {City} &nbsp {Phone} {Mobile} {Email}
</div>
</html>
</ItemTpl>
</ListConfig>
<Store>
<ext:Store ID="storeDocSearch" runat="server" AutoLoad="false">
<Proxy>
<ext:AjaxProxy Url="/SearchControls/DoctorSearch.ashx">
<ActionMethods Read="POST" />
<Reader>
<ext:JsonReader RootProperty="Doc" TotalProperty="total" />
</Reader>
<ExtraParams>
<ext:Parameter Name="clientid" Value="#{hdnclid}.value" Mode="Raw"/>
</ExtraParams>
</ext:AjaxProxy>
</Proxy>
<Model>
<ext:Model ID="mdl" runat="server">
<Fields>
<ext:ModelField Name="id" Type="Int" />
<ext:ModelField Name="FullName" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
</ext:ComboBox>
<ext:Button runat="server" Text="Link doc" >
</ext:Button>
</Items>
</ext:Window>