Jan 29, 2015, 10:25 PM
Fill textField with a value on a store of combo
I have a combo box with custom search like https://examples3.ext.net/#/Form/Com...Custom_Search/
when i select a item, i want to set a textfield with a value that shows on the ItemTpl called 'Correo'
when i select a item, i want to set a textfield with a value that shows on the ItemTpl called 'Correo'
<ext:ComboBox ID="cmbNombreReporta3" runat="server"
MaxLength="100"
FieldLabel="Nombre de quien solicita" LabelAlign="Top" LabelStyle="font-weight:bold;"
DisplayField="NombreCompleto" ValueField="Id" TypeAhead="false" OnDirectChange="cmbNombreReporta_DirectChange"
ColumnWidth="0.33"
ForceSelection="true"
PaddingSpec="0px 10px 0px 0px"
PageSize="10"
AllowBlank="false"
HideBaseTrigger="true" MinChars="3" TriggerAction="Query">
<ListConfig LoadingText="Buscando...">
<ItemTpl ID="ItemTpl4" runat="server">
<Html>
<div class="search-item">
<h3>{NombreCompleto}</h3>
{Correo}
</div>
</Html>
</ItemTpl>
<Listeners>
<Select Handler="#{txtFieldCorreoReporta3}.setValue(#{cmbNombreReporta3}.lastSelection[0].data.Correo);" />
</Listeners>
</ListConfig>
<Store>
<ext:Store ID="Store1" runat="server" AutoLoad="false">
<Proxy>
<ext:AjaxProxy Url="Usuarios.ashx">
<ActionMethods Read="POST" />
<Reader>
<ext:JsonReader Root="users" TotalProperty="total" />
</Reader>
</ext:AjaxProxy>
</Proxy>
<Model>
<ext:Model ID="Model11" runat="server">
<Fields>
<ext:ModelField Name="NombreCompleto" />
<ext:ModelField Name="Correo" />
<ext:ModelField Name="Id" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
</ext:ComboBox>
when i use firebug the code App.cmbNombreReporta3.lastSelection[0].data.Correo it give me the correct data, but the text field doesn't fill with the data.
Last edited by geoffrey.mcgill; Jan 29, 2015 at 11:47 PM.