[OPEN] ComboBox Value

  1. #1

    [OPEN] ComboBox Value


    The example below will demonstrate that I can not submit a value in a ComboBox that is not in the list:

    <%@ Page Language="C#" %>
    <%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  
    <script runat="server">
    protected void btnDemo_Click(object sender, AjaxEventArgs e)
        lblTest.Text = "Omg ... you selected: " + drpEmployeeRole.SelectedItem.Value;
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head id="Head1" runat="server">
        <title>Untitled Page</title>
        <p><a href="Example.aspx">Reload</a></p>
        <form id="form1" runat="server">
            <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="True" />
            <ext:ScriptManager ID="ScriptManager2" runat="server" Theme="Gray" />
            <ext:ComboBox ID="drpEmployeeRole"
                EmptyText="Provide a Member Role ..."
                    <ExtJS:ListItem Text="Consultant" />
                    <ExtJS:ListItem Text="Coordinator" />
                    <ExtJS:ListItem Text="Project Coordinator" />
                    <ExtJS:ListItem Text="Project Manager" />
            <ext:Button ID="btnDemo" runat="server" AutoPostBack="False" Text="Save">
                    <Click OnEvent="btnDemo_Click" />
            <ext:Label ID="lblTest" runat="server" Text="Waiting ..." />
    Replication steps:

    1. Enter "Timothy" into Combobox
    2. Click "Save"
    3. Notice it doesn't show Timothy as selected
    4. Select "Consultant" from Combobox (or type it)
    5. Click "Save"
    6. Notice it knows my selection

    I thought it might be the SelectedItem property, because I haven't really selected anything, but even the underlying Value property is null. Have I missed a property setting to make this work?

  2. #2

    RE: [OPEN] ComboBox Value

    any update on this? i've got the same problem.
  3. #3

    RE: [OPEN] ComboBox Value


    The solution is set ForceSelection="false" for ComboBox

Similar Threads

  1. [CLOSED] Forcing combobox to remain open after selection
    By SymSure in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: May 30, 2011, 9:38 PM
  2. [CLOSED] Open ComboBox on Click?
    By iansriley in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jan 20, 2011, 12:58 PM
  3. Replies: 5
    Last Post: Jun 16, 2009, 1:27 PM
  4. Replies: 3
    Last Post: Mar 30, 2009, 1:53 PM
  5. [OPEN] ComboBox Rendering issue
    By Timothy in forum Bugs
    Replies: 7
    Last Post: Sep 30, 2008, 5:33 PM

Posting Permissions