May 31, 2011, 12:55 PM
[CLOSED] Problem about dynamic loading data from server and binding with SelectBox
Hi:
I have a problem about binding SelectBox with store which is dynamic loading data from server
Basically I don't want store to load the data at the page load. I just want to click a button and then load the data and bind to SelectBox
The SelectBox details is :
the code is below:
The problem is when the data send back from server, the store didn't load the data from server.
I have a problem about binding SelectBox with store which is dynamic loading data from server
Basically I don't want store to load the data at the page load. I just want to click a button and then load the data and bind to SelectBox
The SelectBox details is :
<ext:SelectBox ID="SelTransferTeam" runat="server" Width="300"
DisplayField="Name" ValueField="Id" EmptyText="<%$Resources:Strings,PleaseSelectATeam%>">
<Store>
<ext:Store ID="StoreWorkgroupForCoreTask" runat="server" AutoLoad="false" ShowWarningOnFailure="false">
<Proxy>
<ext:HttpProxy Url="~/Planning/CorePlanning/WorkgroupForCoretask">
</ext:HttpProxy>
</Proxy>
<Listeners>
<LoadException Handler="handleDateRangesException(response)" />
</Listeners>
<BaseParams>
<ext:Parameter Name="coreTaskId" Value="getSelectedCoreTaskId()" Mode="Raw" />
</BaseParams>
<Reader>
<ext:JsonReader IDProperty="Id">
<Fields>
<ext:RecordField Name="Id">
</ext:RecordField>
<ext:RecordField Name="Name">
</ext:RecordField>
</Fields>
</ext:JsonReader>
</Reader>
</ext:Store>
</Store>
</ext:SelectBox>
and in button click handler, I use javascript to load data from server. the code is below:
StoreWorkgroupForCoreTask.load();
The method in server side is working correctly. I can see there are some data send back.The problem is when the data send back from server, the store didn't load the data from server.
Last edited by Daniil; May 31, 2011 at 3:55 PM.
Reason: [CLOSED]