[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:
Code:
<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
Code:
<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:
Code:
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:
Code:
_GUIDab5153de_ddcd_44ba_8522_98b210b79d19_PORTAL49PORTLET116_UC_ContractRuntime_CancelPeriodType_state
is either
Code:
[{"value":"Months","text":"Monate","index":2}]
which gives SelectedItem.Value = null.
But
Code:
[{"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!