Sep 07, 2012, 6:28 AM
SelectBox and JSON reader -- SelectBox only shows "Loading...."
in my form I have a SelectBox, which should load the data from the server.
When I click on the "down" arrow of the SelectBox, it only displays "loading..." and no content is shown.
here is my SelectBox:
I did search the web already for an example, where I could see what I am doing wrong, but I could not find anything.
When I click on the "down" arrow of the SelectBox, it only displays "loading..." and no content is shown.
here is my SelectBox:
<ext:SelectBox ID="ContractGroup" runat="server" DisplayField="ContractGroupName"
ValueField="ContractGroupID" EmptyText="ContractGroup...">
<Store>
<ext:Store ID="Store_ContractGroup" runat="server">
<Model>
<ext:Model ID="Model1" runat="server">
<Fields>
<ext:ModelField Name="ContractGroupID" />
<ext:ModelField Name="ContractGroupName" />
</Fields>
<Proxy>
<ext:JsonPProxy Url="/Contract/GetContractGroup">
<Reader>
<ext:JsonReader AutoDataBind="true">
</ext:JsonReader>
</Reader>
</ext:JsonPProxy>
</Proxy>
</ext:Model>
</Model>
</ext:Store>
</Store>
</ext:SelectBox>
and here is the json response form the server:
[{"ContractGroupID":1,"ContractGroupName":"root"},{ "ContractGroupID":2,"ContractGroupName":"MasterGro up"}]