Jan 24, 2013, 9:15 AM
[OPEN] [#136] ComboBox ForceSelection problem
Hi all,
I have a problem when loading a combobox.
The problem is that when I use the ForceSelection="true", the value does not load into the combo.
When removing the ForceSelection="true", the value appears in the combo
Please find below a sample
Any help is appreciated,
Thanks.
I have a problem when loading a combobox.
The problem is that when I use the ForceSelection="true", the value does not load into the combo.
When removing the ForceSelection="true", the value appears in the combo
Please find below a sample
<%@ Page Language="C#" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html>
<html>
<head id="Head1" runat="server">
<title>Ajax Linked Combos - Ext.NET Examples</title>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
object[] typeOfActivitiesList = new object[]
{
new object[] { 1, "type1" },
new object[] { 2, "type2" },
new object[] { 3, "type3" },
new object[] { 4, "type4" },
new object[] { 5, "type5" }
};
this.storeTypeOfActivity.DataSource = typeOfActivitiesList;
this.storeTypeOfActivity.DataBind();
this.ComboBox1.Value = 1;
this.ComboBox2.Value = 1;
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<ext:ResourceManager ID="ResourceManager1" runat="server">
</ext:ResourceManager>
<ext:Store ID="storeTypeOfActivity" runat="server">
<Model>
<ext:Model ID="modelTypeOfActivity" runat="server">
<Fields>
<ext:ModelField Name="getId" Type="Int" />
<ext:ModelField Name="getName" Type="String" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
<ext:ComboBox LabelWidth="200" runat="server" ID="ComboBox1" Width="300" FieldLabel="Combo 1 ( ForceSelection=false)"
LabelAlign="Right" LabelSeparator=" " AllowBlank="false" DisplayField="getName"
ValueField="getId" StoreID="storeTypeOfActivity" QueryMode="Local" MatchFieldWidth="false">
</ext:ComboBox>
<ext:ComboBox LabelWidth="200" runat="server" ID="ComboBox2" Width="300" FieldLabel="Combo 1 ( ForceSelection=true)"
LabelAlign="Right" LabelSeparator=" " AllowBlank="false" DisplayField="getName"
ValueField="getId" StoreID="storeTypeOfActivity" QueryMode="Local" MatchFieldWidth="false"
ForceSelection="true">
</ext:ComboBox>
</div>
</form>
</body>
</html>
Any help is appreciated,
Thanks.
Last edited by Daniil; Jan 24, 2013 at 2:46 PM.
Reason: [OPEN] [#136]