Combo Box Problem

  1. #1

    Combo Box Problem

    Hello,

    I have a problem with the combobox control. I am accesing my database through a SQLDataSource, I load the data into a Store, then I read that data from the combobox. In the web page I can see the combobox with the data loaded but I cannot select any item, no matter what I do, it always displays the first item as the selected one.

    Here is my code:

            <ext:Store ID="Store1" runat="server" DataSourceID="SqlDataSource1">
                <Reader>
                    <ext:JsonReader ReaderID="Reader1">
                        <Fields>
                            <ext:RecordField Name="CodPais" Type="Int"></ext:RecordField>
                            <ext:RecordField Name="Nombre" Type="String"></ext:RecordField>
                        </Fields>
                    </ext:JsonReader>
                </Reader>
            </ext:Store>
            <ext:ComboBox ID="ComboBox2" runat="server" StoreID="Store1" DisplayField="Nombre" ValueField="CodPais">
            </ext:ComboBox>
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                ConnectionString="<%$ ConnectionStrings:BasePruebasConnectionString %>" 
                SelectCommand="SELECT [CodPais], [Nombre] FROM [Pais]"></asp:SqlDataSource>

    Can someone help me?

    Regards,
    J. Pablo Ovalle
  2. #2

    RE: Combo Box Problem

    Hi,

    Remove ReaderID. ReaderID is field's name which contains id values
  3. #3

    RE: Combo Box Problem

    Thanks a lot, it worked!!

Similar Threads

  1. [OPEN] [#116] Problem to reset a combo
    By 78fede78 in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jan 04, 2013, 12:48 PM
  2. [CLOSED] combo box problem
    By Vasudhaika in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: May 16, 2011, 1:03 PM
  3. [CLOSED] Combo value problem
    By Vasudhaika in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Feb 09, 2011, 12:04 PM
  4. Combo Box TEXT Problem
    By EMS in forum 1.x Help
    Replies: 1
    Last Post: Dec 07, 2010, 2:36 PM
  5. Problem with the paging combo box
    By huynd in forum 1.x Help
    Replies: 1
    Last Post: Aug 26, 2010, 8:11 AM

Posting Permissions