Dec 17, 2013, 7:11 PM
[CLOSED] How can I change fields inside <ItemTpl> in client side
Hi,
How can I change <ItemTpl> in client side? It is possible ? According to <ComboBox> selection, I need change the fields inside <ItemTpl>.
Thanks,
How can I change <ItemTpl> in client side? It is possible ? According to <ComboBox> selection, I need change the fields inside <ItemTpl>.
Thanks,
<ext:ComboBox ID="cboOption" runat="server" Editable="false"
TypeAhead="true" Mode="Local" ForceSelection="true" TriggerAction="All">
<Items>
<ext:ListItem Text="Option 1" Value="1" />
<ext:ListItem Text="Option 2" Value="2" />
</Items>
</ext:ComboBox>
<ext:ComboBox ID="cboItem"
AutoSelect="false"
AutoShow="false"
runat="server"
TypeAhead="false"
HideBaseTrigger="true"
MinChars="0"
TriggerAction="Query"
Flex="1"
ForceSelection="false">
<Store>
<ext:Store ID="storeItem" runat="server" AutoLoad="false" OnReadData="storeItem_read" >
<Proxy>
<ext:PageProxy />
</Proxy>
<Model>
<ext:Model ID="Model1" runat="server">
<Fields>
<ext:ModelField Name="Field1" />
<ext:ModelField Name="Field2" />
<ext:ModelField Name="Field3" />
<ext:ModelField Name="Field4" />
<ext:ModelField Name="Field5" />
<ext:ModelField Name="Field6" />
</Fields>
</ext:Model>
</Model>
<Parameters>
<ext:StoreParameter Name="text" Value="#{cboItem}.getValue()" Mode="Raw"/>
</Parameters>
</ext:Store>
</Store>
<ListConfig ID="lstCfg" LoadingText="Searching...">
<ItemTpl runat="server">
<Html>
<div class="search-item">
<%-- Config1 --%>
<%-- if (cboOption.getValue() == 1) // show this. --%>
<h3><span>{Field1}</span>{Field2}</h3>
{Field3}
<%-- Config2 --%>
<%-- if (cboOption.getValue() == 2) // show this. --%>
<h3><span>{Field4}</span>{Field5}</h3>
{Field6}
</div>
</Html>
</ItemTpl>
</ListConfig>
</ext:ComboBox>
Last edited by Daniil; Dec 24, 2013 at 8:27 AM.
Reason: [CLOSED]