May 25, 2012, 10:14 AM
[CLOSED] Hidden="true" behaves as Visible="false"
I'm trying to hide a ComoboBox when it has just one record.
I need the form layout is mantained; so I expect the control leaves white space at his place.
But the control disappears freeing space and other controls moves.
This is "Visible= false" behavioor not "hidden=true"
My ComboBox is inside a FieldContainer with Layout="HBoxLayout"
Here is my Combo. Please note in Store Listener.
M
I need the form layout is mantained; so I expect the control leaves white space at his place.
But the control disappears freeing space and other controls moves.
This is "Visible= false" behavioor not "hidden=true"
My ComboBox is inside a FieldContainer with Layout="HBoxLayout"
Here is my Combo. Please note in Store Listener.
M
<ext:ComboBox ID="cbCilindro" runat="server" Editable="false" ForceSelection="true" ValueField="Code" DisplayField="Cilindro" Flex="1"
Note="Cilindro" NoteAlign="Top" SelectOnFocus="true" Margins="0 8 0 0" >
<ListConfig>
<ResizableConfig runat="server" Handles="South" />
</ListConfig>
<Store>
<ext:Store ID="stCilindro" runat="server" PageSize="10">
<Proxy>
<ext:AjaxProxy Json="true" Url="../WebServices/AjaxWebService.asmx/getCilindroProdotto">
<ActionMethods Read="POST" />
<Reader>
<ext:JsonReader Root="d.Data" TotalProperty="d.Total" />
</Reader>
</ext:AjaxProxy>
</Proxy>
<Parameters>
<ext:StoreParameter Name="basketID" Value='<%# Request.QueryString["Id"] %>' AutoDataBind="true" />
<ext:StoreParameter Name="gruppoMerc" Value="#{cbFamiglieProdotto}.getValue()" Mode="Raw" />
<ext:StoreParameter Name="confezione" Value="#{cbConfezioniProdotto}.getValue()" Mode="Raw" />
<ext:StoreParameter Name="campione" Value="false" Mode="Value" />
</Parameters>
<Model>
<ext:Model runat="server">
<Fields>
<ext:ModelField Name="Code" />
<ext:ModelField Name="Cilindro" />
</Fields>
</ext:Model>
</Model>
<Listeners>
<Load Handler="if (records.length==1) { #{cbCilindro}.hide(); }" />
</Listeners>
<%--<Sorters>
<ext:DataSorter Property="Cilindro" Direction="ASC" />
</Sorters>--%>
</ext:Store>
</Store>
<Listeners>
<Select Handler="#{cbAsse}.clearValue();#{stAsse}.load();" />
</Listeners>
</ext:ComboBox>
Last edited by Daniil; Jun 04, 2012 at 7:39 PM.
Reason: [CLOSED]