Mar 04, 2009, 3:48 AM
ComboBox with SqlDataSource
Hello all,
I am new to using Coolite, but am familiar with the Microsoft ASP & AJAX control implementations. I had a page completely working with ASP.Net controls but when I added the grid control from Coolite, the styles clashed horribly. Although this is an internal website, I still pride myself on fit and finish as well as performance. I have now decided to move over to the Coolite Toolkit for
everything, as I want to be able to get all of the controls styled
similarly.
I am having trouble getting a ComboBox to display the results from a SqlDataSource that is connected to an Oracle server. The datastore retrieves the data, but the rows are all empty.
Here's the relevent markup:
I searched through the forums, but there are very few comments about Oracle. Is this something specific to Oracle? Have I done something stupid in the code?
Thanks kindly for you help.
Gargamel
I am new to using Coolite, but am familiar with the Microsoft ASP & AJAX control implementations. I had a page completely working with ASP.Net controls but when I added the grid control from Coolite, the styles clashed horribly. Although this is an internal website, I still pride myself on fit and finish as well as performance. I have now decided to move over to the Coolite Toolkit for
everything, as I want to be able to get all of the controls styled
similarly.
I am having trouble getting a ComboBox to display the results from a SqlDataSource that is connected to an Oracle server. The datastore retrieves the data, but the rows are all empty.
Here's the relevent markup:
<ext:ScriptManager ID="ScriptManager1" runat="server" ScriptMode="Debug">
</ext:ScriptManager>
<asp:SqlDataSource id="MTSODataSource" SelectCommand="SELECT ident, label FROM west.ne_mtx ORDER BY label ASC" ConnectionString="<%$ ConnectionStrings:serenity %>" ProviderName="<%$ ConnectionStrings:serenity.ProviderName %>" Runat="server" />
<ext:Store ID="MTSOStore" DataSourceID="MTSODataSource" runat="server">
<Reader>
<ext:JsonReader ReaderID="ident">
<Fields>
<ext:RecordField Name="ident" Type="Int" />
<ext:RecordField Name="label" Type="String" />
</Fields>
</ext:JsonReader>
</Reader>
<Listeners>
<LoadException Handler="Ext.Msg.alert('MTSO list - Load failed', e.message || response.statusText);" />
</Listeners>
</ext:Store>
<ext:ComboBox ID="MTSOList" CausesValidation="false" FieldLabel="MTSO:" Width="200" StoreID="MTSOStore" TriggerAction="All" Mode="Local" EmptyText="Select MTSO" DisplayField="label" ValueField="ident" ForceSelection="true" runat="server" Selectonfocus="True">
</ext:ComboBox>
The SqlDatasource is connected to an Oracle database. The browser renders the control just fine, but the dropdown appears to have 15 short rows, only about 5 pixels high each. Using the DOM inspector in Firebug, I can see 15 results rows, each with ident and label = "" (See attached for the output from Firebug). On the <ext:RecordField> element, I have tried omitting the type as well as setting it to string, and float and int depending on the filed type in Oracle.I searched through the forums, but there are very few comments about Oracle. Is this something specific to Oracle? Have I done something stupid in the code?
Thanks kindly for you help.
Gargamel