Oct 14, 2015, 10:08 AM
[FIXED] [#922] [3.3] ComboBox SelectedItem problem
I got some problems using the ComboBox Controls.
For some reason the SelectedItem.Value property is null only for some items in the combobox.
For other selected items everything works. I don't get it why this happens.
The ComboBox is defined as followed:
It looks like the data is submitted correctly:
But
Please help me asap, as I'm messing around with this issue for days now!
For some reason the SelectedItem.Value property is null only for some items in the combobox.
For other selected items everything works. I don't get it why this happens.
The ComboBox is defined as followed:
<ext:ComboBox ID="CancelPeriodType" runat="server" Disabled="false"
Width="80"
AllowBlank="true"
MsgTarget="Side"
InvalidCls=""
Editable="false"
ValueField="Key"
DisplayField="Value"
EmptyText="Monate"
FieldLabel="">
<Store>
<ext:Store runat="server" ModelName="EnumModel"/>
</Store>
</ext:ComboBox>
using this model <ext:Model runat="server" Name="EnumModel">
<Fields>
<ext:ModelField Name="Key" />
<ext:ModelField Name="Value" />
</Fields>
</ext:Model>
It is filled in the page_load with this line:this.CancelPeriodType.GetStore().DataSource = this.GetEnumTranslation<BasContractCancelPeriodType>();
which basicly creates an IList<KeyValuePair<T, string>> with the EnumValue as key and the translated String as value.It looks like the data is submitted correctly:
_GUIDab5153de_ddcd_44ba_8522_98b210b79d19_PORTAL49PORTLET116_UC_ContractRuntime_CancelPeriodType_state
is either[{"value":"Months","text":"Monate","index":2}]
which gives SelectedItem.Value = null.But
[{"value":"Weeks","text":"Wochen","index":1}]
works and gives SelectedItem.Value = "Weeks".Please help me asap, as I'm messing around with this issue for days now!
Last edited by Daniil; Oct 16, 2015 at 10:17 AM.
Reason: [FIXED] [#922] [3.3]