Aug 17, 2010, 3:19 AM
Can't get a ComboBox to bind to a SqlDataSource
Hi guys, I'm trying to bind a very simple ComboBox to a SqlDataSource but it is not working, it doesn't render the ComboBox and corrupts the other controls on the page, can you please take a look at my sample code?
Thank you
Thank you
<asp:SqlDataSource ID="getCSR" runat="server" ConnectionString="..." SelectCommand="SELECT ID, Display FROM CSR ORDER BY Display" ProviderName="System.Data.SqlClient">
</asp:SqlDataSource>
<ext:Store ID="StoreCSR" runat="server" DataSourceID="getCSR">
<Reader>
<ext:JsonReader IDProperty="ID">
<Fields>
<ext:RecordField Name="ID" />
<ext:RecordField Name="Display" />
</Fields>
</ext:JsonReader>
</Reader>
</ext:Store>
<ext:ComboBox ID="ComboBox1" runat="server" StoreID="StoreCSR"
DisplayField="Display" ValueField="ID">
</ext:ComboBox>