Mar 16, 2015, 4:10 PM
AutoLoadParams not applied with RemoteFilter
Hi,
I found out, that Ext.Net.Store.AutoLoadParams is not applied to first request of store, if Ext.Net.Store.RemoteFilter is true and there are som GridFilters in grid connected with store.
Example:
Thanks.
I found out, that Ext.Net.Store.AutoLoadParams is not applied to first request of store, if Ext.Net.Store.RemoteFilter is true and there are som GridFilters in grid connected with store.
Example:
<%@ Page Language="C#" AutoEventWireup="true" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<ext:ResourceManager runat="server" />
<ext:Store
ID="store"
runat="server"
AutoLoad="true"
RemoteFilter="true"
OnReadData="storeMain_RefreshData">
<Proxy>
<ext:PageProxy />
</Proxy>
<Model>
<ext:Model runat="server" IDProperty="ID">
<Fields>
<ext:ModelField Name="ID" />
<ext:ModelField Name="Name" />
</Fields>
</ext:Model>
</Model>
<%-- <AutoLoadParams>
<ext:Parameter Name="start" Value="40" />
</AutoLoadParams>--%>
</ext:Store>
<ext:Viewport ID="viewport" runat="server" Layout="border">
<Items>
<ext:GridPanel
ID="gridMain"
runat="server"
Region="Center"
StoreID="store">
<ColumnModel>
<Columns>
<ext:Column Width="150" runat="server" DataIndex="Name" Text="Name">
<Filter>
<ext:StringFilter />
</Filter>
</ext:Column>
<ext:Column Width="140" runat="server" DataIndex="ID" Text="ID" />
</Columns>
</ColumnModel>
<View>
<ext:GridView runat="server" />
</View>
<Plugins>
<ext:GridFilters runat="server" />
</Plugins>
</ext:GridPanel>
</Items>
</ext:Viewport>
</form>
</body>
</html>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
if (!X.IsAjaxRequest) this.store.AutoLoadParams["start"] = "40";
}
protected void storeMain_RefreshData(object sender, StoreReadDataEventArgs e)
{
if (e.Start == 40)
{
// OK
}
else
{
// WRONG
}
}
</script>
Is it a bug or intended behavior?Thanks.