Jul 15, 2009, 2:17 PM
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:
Can someone help me?
Regards,
J. Pablo Ovalle
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