PDA

View Full Version : [CLOSED] Store Callback not firing



softmachine2011
Sep 20, 2012, 2:57 PM
Hi,

I think that due to revision 4362 of Ext.NET 2.1 now this test case isn't working. But if you don't set AutoLoad property, works right.

TEST CASE


<!DOCTYPE html>
<html>
<head runat="server">
<title>GridPanel with FitLayout - Ext.NET Examples</title>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />

<ext:Button runat="server" Text="Reload My Grid">
<Listeners>
<Click Handler="grid1.setDisabled(true);
grid1.getStore().warningOnDirty = false;
grid1.getStore().reload({
callback: function () {
alert('callback raised');

grid1.setDisabled(false);
}
});
grid1.getStore().warningOnDirty = true;" />
</Listeners>
</ext:Button>
<ext:Window ID="Window1" runat="server" Collapsible="true" Maximizable="true" Icon="Lorry"
Title="Job List" Width="600" Height="300" X="50" Y="50" Layout="Fit">
<Items>
<ext:GridPanel ID="grid1" runat="server" Header="false" Border="false">
<Store>
<ext:Store ID="Store1" runat="server" PageSize="10" AutoLoad="false">
<Proxy>
<ext:AjaxProxy Url="/Area/Sample/Data">
<Reader>
<ext:JsonReader IDProperty="ID" Root="data" />
</Reader>
</ext:AjaxProxy>
</Proxy>
<Model>
<ext:Model runat="server" IDProperty="ID">
<Fields>
<ext:ModelField Name="ID" />
<ext:ModelField Name="Name" />
<ext:ModelField Name="Value" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ColumnModel runat="server">
<Columns>
<ext:Column runat="server" Text="ID" Width="40" Sortable="true" DataIndex="ID" />
<ext:Column runat="server" Text="Job Name" Sortable="true" DataIndex="Name" Flex="1" />
<ext:Column runat="server" Text="Value" Width="120" Sortable="true" DataIndex="Value" />
</Columns>
</ColumnModel>
<View>
<ext:GridView runat="server" LoadMask="false" LoadingUseMsg="false" StripeRows="true" TrackOver="true" />
</View>
<BottomBar>
<ext:PagingToolbar runat="server" DisplayInfo="true" DisplayMsg="Displaying Jobs {0} - {1} of {2}" />
</BottomBar>
</ext:GridPanel>
</Items>
</ext:Window>
</form>
</body>
</html>

Vladimir
Sep 20, 2012, 5:59 PM
Thanks for the report. Fixed in SVN

softmachine2011
Sep 21, 2012, 11:34 AM
Tested and working. (rev 4366)

Thanks