[OPEN] [#136] ComboBox ForceSelection problem

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [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
    <%@ 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]

Similar Threads

  1. Combobox with forceselection and loadRecord
    By nukarsoft in forum 2.x Help
    Replies: 0
    Last Post: Jan 07, 2013, 2:38 PM
  2. [0.8.1] Combo with ForceSelection
    By sidinwillis in forum 1.x Help
    Replies: 6
    Last Post: Dec 22, 2009, 10:25 AM
  3. [CLOSED] ComboBox ForceSelection=False and Change Event
    By Steve in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: May 13, 2009, 2:48 AM
  4. [CLOSED] What does ForceSelection do in ComboBox?
    By harafeh in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Mar 16, 2009, 1:48 PM
  5. ForceSelection on Combo not working
    By jeybonnet in forum Bugs
    Replies: 2
    Last Post: Feb 01, 2009, 12:24 PM

Posting Permissions