Jun 13, 2013, 11:54 AM
[CLOSED] Can't figure out how to get value from combobox
Hi,
I am stucked with this combobox :
I am stucked with this combobox :
<ext:ComboBox runat="server" ID="CB_AgentPlan" StoreID="Store_AgentPlan" DisplayField="agent" ValueField="cp" width="250px" />
<ext:Store ID="Store_AgentPlan" runat="server">
<Model>
<ext:Model runat="server">
<Fields>
<ext:ModelField Name="agent" Type="String" />
<ext:ModelField Name="cp" Type="String" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
I set a DirectEvent on a button but when I call CB_AgentPlan.SelectedItem.Value or Text from code-behind I only get a null. The Count property is equals to zero but from other posts I understand it's normal when you use stores. I tried to pass a parameter (below) but it's not doing much.<ext:Button ID="Button1" runat="server" Text="Dispatcher la prestation" Icon="Accept">
<DirectEvents>
<Click OnEvent="SendAgent">
<ExtraParams>
<ext:Parameter Name="AgentPlan" Value="#{CB_AgentPlan}.getValue();" />
</ExtraParams>
</Click>
</DirectEvents>
</ext:Button>
Cheers :)
Last edited by Daniil; Jun 13, 2013 at 2:30 PM.
Reason: [CLOSED]