Mar 07, 2016, 9:55 AM
[CLOSED] Get ComboBox Selected Value as ExtraParams
Hi,
I'm passing
How to achieve that?
Regards,
Alaswad
I'm passing
ExtraParams
on Button
Click
DirectEvents
as following: <ext:Button ID="btnSaveReceiptInfo" ClientIDMode="Static" runat="server" Icon="DiskBlack" Text="Save" >
<DirectEvents>
<Click OnEvent="AddNewReceipt" Before="if(validateReceiptInput()) { return true; }else{ return false; }">
<ExtraParams>
<ext:Parameter
Name="myPaymentCurrency"
Value="#{ddlPaymentCurrency}.getValue()"
Mode="Raw"
Encode="false" />
</ExtraParams>
</Click>
</DirectEvents>
</ext:Button>
And Payment Currency List is defined as following: <ext:ComboBox ID="ddlPaymentCurrency" LabelWidth="180" AllowBlank="false" ClientIDMode="Static" Flex="1" ValueField="CURRENCYID" DisplayField="CURRENCY_NAME_E" runat="server" LabelAlign="Left" FieldLabel="Currency">
<Store>
<ext:Store ID="ddlPaymentCurrencyStore" runat="server">
<Model>
<ext:Model ID="ddlPaymentCurrencyModel" runat="server" >
<Fields>
<ext:ModelField Name="CURRENCYID" />
<ext:ModelField Name="CURRENCY_NAME_E" Type="String" />
<ext:ModelField Name="EXCHANGE_RATE" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
</ext:ComboBox>
When executing the event code: <DirectMethod(ShowMask:=True, Msg:="Adding Receipt...")> _
Function AddNewReceipt(sender As Object, e As DirectEventArgs) As Boolean
Dim PaymentCurrency As String = e.ExtraParams("myPaymentCurrency")
Return True
End Function
The value submitted is the DisplayField="CURRENCY_NAME_E"
but what I want is ValueField="CURRENCYID"
. How to achieve that?
Regards,
Alaswad
Last edited by fabricio.murta; Mar 22, 2016 at 11:23 PM.
Reason: no user feedback for 7+ days