I have the below code
<ext:ResourceManager ID="ResourceManager1" runat="server">
</ext:ResourceManager>
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:AProjeConnectionString %>"
SelectCommand="SELECT Id,Name FROM PD">
</asp:SqlDataSource>
<ext:ComboBox ID="Departman" runat="server"
DisplayField="Name"
ValueField="Id"
FieldLabel="Departman"
EmptyText="Departman status" Flex="1">
<Store>
<ext:Store ID="Store2" runat="server" DataSourceID="SqlDataSource2" AutoDataBind="true">
<Model>
<ext:Model ID="Model2" runat="server">
<Fields>
<ext:ModelField Name="Id" />
<ext:ModelField Name="Name" />
</Fields>
</ext:Model>
</Model>
<Reader>
<ext:ArrayReader />
</Reader>
</ext:Store>
</Store>
</ext:ComboBox>
The result is an empty ComboBox. Does anyone know why this isn’t populating the ComboBox?
Please try to remove:
An ArrayReader expects an array of arrays, i.e. it gets access to data via indexes.
A default JsonReader expects an array of objects, i.e. it gets access to data via properties’ names.